From: Taylor R Campbell Date: Fri, 7 Dec 2018 04:42:29 +0000 (+0000) Subject: Fix sign of NaN in reader. X-Git-Tag: mit-scheme-pucked-10.1.7~3^2~41 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=6235faaba1859145e9ed71eeade5ced61b614e80;p=mit-scheme.git Fix sign of NaN in reader. --- diff --git a/src/runtime/numpar.scm b/src/runtime/numpar.scm index c5da9fc5a..1c65a9e7a 100644 --- a/src/runtime/numpar.scm +++ b/src/runtime/numpar.scm @@ -120,7 +120,7 @@ USA. ((and (char-ci=? #\n char) (string-prefix-ci? "an.0" string start end)) (parse-complex string (+ start 4) end - (flo:nan.0) + (apply-sign sign (flo:nan.0)) exactness radix sign)) ((i? char) (and (fix:= start end) diff --git a/tests/runtime/test-numpar.scm b/tests/runtime/test-numpar.scm index 534680696..aa3bc16f5 100644 --- a/tests/runtime/test-numpar.scm +++ b/tests/runtime/test-numpar.scm @@ -167,12 +167,12 @@ USA. (define-eqv-test "-2-0.i" (make-rectangular -2 -0.)) (define-eqv-test "+nan.0" (flo:make-nan #f #t 0)) -(define-eqv-test "-nan.0" (flo:make-nan #t #t 0) expect-failure) +(define-eqv-test "-nan.0" (flo:make-nan #t #t 0)) (define-eqv-test "+inf.0" (flo:+inf.0)) (define-eqv-test "-inf.0" (flo:-inf.0)) (define-eqv-test "#i+nan.0" (flo:make-nan #f #t 0)) -(define-eqv-test "#i-nan.0" (flo:make-nan #t #t 0) expect-failure) +(define-eqv-test "#i-nan.0" (flo:make-nan #t #t 0)) (define-eqv-test "#i+inf.0" (flo:+inf.0)) (define-eqv-test "#i-inf.0" (flo:-inf.0))