might want to accurately divide large negative fixnums too

Joe Groff 2009-10-31 12:10:29 -05:00
parent 6f65b2869e
commit 03c1c916e0
2 changed files with 2 additions and 1 deletions

View File

@ -229,3 +229,4 @@ unit-test
! Ensure that /f is accurate for fixnums > 2^53 on 64-bit platforms
[ HEX: 1.758bec11492f9p-54 ] [ 1 12345678901234567 /f ] unit-test
[ HEX: -1.758bec11492f9p-54 ] [ 1 -12345678901234567 /f ] unit-test

View File

@ -41,7 +41,7 @@ CONSTANT: bignum/f-threshold HEX: 20,0000,0000,0000
[ >float ] bi@ float/f ; inline
M: fixnum /f
2dup [ bignum/f-threshold >= ] either?
2dup [ abs bignum/f-threshold >= ] either?
[ bignum/f ] [ fixnum/f ] if ; inline
M: fixnum mod fixnum-mod ; inline