From 3820df12abf8dee19e1272519d6f142a11f690dd Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Fri, 16 Nov 2018 07:41:53 +0000 Subject: [PATCH] Fix definition of flo:largest-positive-normal. --- src/runtime/arith.scm | 2 +- tests/runtime/test-numpar.scm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/arith.scm b/src/runtime/arith.scm index fe9c3989a..583253e03 100644 --- a/src/runtime/arith.scm +++ b/src/runtime/arith.scm @@ -156,7 +156,7 @@ USA. (set! flo:smallest-positive-normal (flo:ldexp 1. flo:normal-exponent-min-base-2)) (set! flo:largest-positive-normal - (flo:ldexp 1. flo:normal-exponent-max-base-2)) + (flo:ldexp (flo:nextafter 2. 0.) flo:normal-exponent-max-base-2)) unspecific) (define (initialize-package!) diff --git a/tests/runtime/test-numpar.scm b/tests/runtime/test-numpar.scm index 5d96200a6..34410caec 100644 --- a/tests/runtime/test-numpar.scm +++ b/tests/runtime/test-numpar.scm @@ -90,7 +90,7 @@ USA. (define-eqv-test "#e#x1.1p-1" (* #x11 (expt 2 (- (+ 1 4))))) (define-eqv-test "#x1.1p-1" (exact->inexact (* #x11 (expt 2 (- (+ 1 4)))))) (define-eqv-test "#x1p-1022" flo:smallest-positive-normal) -(define-eqv-test "#x1.fffffffffffffp+1023" flo:largest-positive-normal 'xfail) +(define-eqv-test "#x1.fffffffffffffp+1023" flo:largest-positive-normal) (define-eqv-test "#b0." 0.) (define-eqv-test "#b0.+0.i" 0.+0.i) -- 2.25.1