The bignum bug(s)
If, as proposed, in 0.1.0 I implement bignums in Lisp, there's a beautiful and easy-to-understand explanation of how they're implemented in ulisp here, which will…
The
member? bug
This is in commit #7d0ce67373, although the bug has certainly been present in all commits up to this one.
The bignum bug(s)
H'mmm... 0.0.5 also gets that wrong, but differently.
:: (+
10000000000000000000
10000000000000000000
10000000000000000000
10000000000000000000
1000000000000000…
The bignum bug(s)
There is also a bug in add that's definitely a regression:
:: (set! i
(+
10000000000000000000
10000000000000000000
10000000000000000000
10000000000000000000
…
The bignum bug(s)
However, in 0.0.6, multiply is definitely wrong:
:: (* 1152921504606846975 2)
1
:: (inspect (* 1152921504606846975 2))
INTR (1381256777) at page 7, offset 945 count…
The bignum bug(s)
OK, I'm now working in the 0.0.6 branch. There are certainly regressions, but I think the problems are more in print than in add.
:: 1152921504606846977
2
:: (inspect…