From: Taylor R Campbell Date: Sat, 1 Dec 2018 22:49:17 +0000 (+0000) Subject: Add some more spot checks. Zero is not exact here, for sign. X-Git-Tag: mit-scheme-pucked-10.1.7~3^2~69 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=d863301d7a0183c0abb5b2afb26f46fec38ba4f2;p=mit-scheme.git Add some more spot checks. Zero is not exact here, for sign. --- diff --git a/tests/runtime/test-ieee754.scm b/tests/runtime/test-ieee754.scm index bf6d24504..0c23bca41 100644 --- a/tests/runtime/test-ieee754.scm +++ b/tests/runtime/test-ieee754.scm @@ -49,7 +49,7 @@ USA. (biased-exponent (extract-bit-field w t bits)) (trailing-significand (extract-bit-field t 0 bits))) (let ((x (compose sign biased-exponent trailing-significand))) - (assert (or (not (finite? x)) (exact? x))) + (assert (or (zero? x) (not (finite? x)) (exact? x))) ;; Confirm that it yields the same bits. (receive (sign* biased-exponent* trailing-significand*) (decompose x) @@ -76,8 +76,16 @@ USA. (#x0000000000000001) (#x1000000000000000) (#x1000000000000001) + (#x8000000000000000) + (#x8000000000000001) (#x7ff0000000000000) (#xfff0000000000000) + (#x7ff0000000000001) + (#xfff0000000000001) + (#x7ff8000000000000) + (#xfff8000000000000) + (#x7ff8000000000001) + (#xfff8000000000001) (#x0123456789abcdef) (#xfedcba9876543210)) (test-ieee754-roundtrip 11 53