mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
Fix bug in div3 fast path.
This commit is contained in:
@@ -975,7 +975,7 @@ _private_int_div_3 :: proc(quotient, numerator: ^Int, allocator := context.alloc
|
|||||||
q.sign = numerator.sign
|
q.sign = numerator.sign
|
||||||
|
|
||||||
w, t: _WORD
|
w, t: _WORD
|
||||||
#no_bounds_check for ix := numerator.used; ix >= 0; ix -= 1 {
|
#no_bounds_check for ix := numerator.used - 1; ix >= 0; ix -= 1 {
|
||||||
w = (w << _WORD(_DIGIT_BITS)) | _WORD(numerator.digit[ix])
|
w = (w << _WORD(_DIGIT_BITS)) | _WORD(numerator.digit[ix])
|
||||||
if w >= 3 {
|
if w >= 3 {
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user