From 284859c2f9b7072dd0bc1215d43663bb87858025 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Tue, 16 Jul 2013 01:46:05 -0400 Subject: [PATCH] numbers.test: Fix inum/flonum comparison test on 32-bit machines. * test-suite/tests/numbers.test (<): Fix inum/flonum test. --- test-suite/tests/numbers.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-suite/tests/numbers.test b/test-suite/tests/numbers.test index 5e95ab9b6..ab0880d0a 100644 --- a/test-suite/tests/numbers.test +++ b/test-suite/tests/numbers.test @@ -2496,8 +2496,8 @@ ;; Prior to guile 2.0.10, we would unconditionally convert the inum ;; to a double, which on a 64-bit system could result in a ;; significant change in its value, thus corrupting the comparison. - (pass-if (< most-positive-fixnum (exact->inexact most-positive-fixnum))) - (pass-if (< (exact->inexact (- most-positive-fixnum)) (- most-positive-fixnum)))) + (pass-if (< most-positive-fixnum (exact->inexact (+ 1 most-positive-fixnum)))) + (pass-if (< (exact->inexact (- (+ 1 most-positive-fixnum))) (- most-positive-fixnum)))) (with-test-prefix "flonum/frac" (pass-if (< 0.75 4/3))