adding single precision numeric representations in r7rs-tests

This commit is contained in:
Alex Shinn 2017-08-30 23:09:43 +09:00
parent 8a0e1d0ea4
commit f83bc9969b

View file

@ -2365,18 +2365,17 @@
(test-assert (string-append "(eqv?: " str " " str2 ")") (test-assert (string-append "(eqv?: " str " " str2 ")")
(eqv? n (string->number (car ls))))))))) (eqv? n (string->number (car ls)))))))))
;; these all assume double precision, need to add alternatives for single (test-precision "-1.7976931348623157e+308" "-inf.0")
(test-precision "-1.7976931348623157e+308") (test-precision "4.940656458412465e-324" "5.0e-324" "0.0")
(test-precision "4.940656458412465e-324" "5.0e-324") (test-precision "9.881312916824931e-324" "1.0e-323" "0.0")
(test-precision "9.881312916824931e-324" "1.0e-323") (test-precision "1.48219693752374e-323" "1.5e-323" "0.0")
(test-precision "1.48219693752374e-323" "1.5e-323") (test-precision "1.976262583364986e-323" "2.0e-323" "0.0")
(test-precision "1.976262583364986e-323" "2.0e-323") (test-precision "2.470328229206233e-323" "2.5e-323" "0.0")
(test-precision "2.470328229206233e-323" "2.5e-323") (test-precision "2.420921664622108e-322" "2.4e-322" "0.0")
(test-precision "2.420921664622108e-322" "2.4e-322") (test-precision "2.420921664622108e-320" "2.421e-320" "0.0")
(test-precision "2.420921664622108e-320" "2.421e-320") (test-precision "1.4489974452386991" "1.4489975")
(test-precision "1.4489974452386991") (test-precision "0.14285714285714282" "0.14285714285714288" "0.14285715")
(test-precision "0.14285714285714282" "0.14285714285714288") (test-precision "1.7976931348623157e+308" "+inf.0")
(test-precision "1.7976931348623157e+308")
(test-end) (test-end)