From: Taylor R Campbell Date: Fri, 16 Nov 2018 07:41:53 +0000 (+0000) Subject: Fix definition of flo:largest-positive-normal. X-Git-Tag: mit-scheme-pucked-10.1.2~16^2~80 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=3820df12abf8dee19e1272519d6f142a11f690dd;p=mit-scheme.git Fix definition of flo:largest-positive-normal. --- 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)