big: Add randomized testing.
This commit is contained in:
1 parent
13fab36639
commit
c1a001c331
4 files changed
+81
-23
No files matched your search
@@ -402,7 +402,7 @@ int_shl :: proc(dest, src: ^Int, bits: int) -> (err: Error) {
|
||||
shift := DIGIT(_DIGIT_BITS - bits);
|
||||
carry := DIGIT(0);
|
||||
|
||||
for x:= 0; x <= dest.used; x+= 1 {
|
||||
for x:= 0; x < dest.used; x+= 1 {
|
||||
fwd_carry := (dest.digit[x] >> shift) & mask;
|
||||
dest.digit[x] = (dest.digit[x] << uint(bits) | carry) & _MASK;
|
||||
carry = fwd_carry;
|
||||
|
||||
Reference in new issue
Block a user