1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 22:10:21 +02:00

numbers.test: Fix inum/flonum comparison test on 32-bit machines.

* test-suite/tests/numbers.test (<): Fix inum/flonum test.
This commit is contained in:
Mark H Weaver 2013-07-16 01:46:05 -04:00
parent 95ed221785
commit 284859c2f9

View file

@ -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))