From d863301d7a0183c0abb5b2afb26f46fec38ba4f2 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Sat, 1 Dec 2018 22:49:17 +0000 Subject: [PATCH] Add some more spot checks. Zero is not exact here, for sign. --- tests/runtime/test-ieee754.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 -- 2.25.1