Test that (expt bignum -k) is correct

This commit is contained in:
Bertrand Augereau 2018-06-10 02:29:05 +02:00
parent 39043bc47c
commit 4d8933119f

View file

@ -16,6 +16,10 @@
(define (run-tests) (define (run-tests)
(test-begin "numbers") (test-begin "numbers")
(test 3 (expt 3 1))
;(test 1/3 (expt 3 -1))
(test 1/300000000000000000000 (expt 300000000000000000000 -1))
(test '(536870912 536870913 536870911 -536870912 -536870911 -536870913) (test '(536870912 536870913 536870911 -536870912 -536870911 -536870913)
(integer-neighborhoods (expt 2 29))) (integer-neighborhoods (expt 2 29)))