From: Taylor R Campbell Date: Sun, 18 Nov 2018 01:36:25 +0000 (+0000) Subject: Bug: 0 * inf should be NaN, but if the 0 is exact it gives 0. X-Git-Tag: mit-scheme-pucked-10.1.2~16^2~52 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=367c0e2e38b08f50d2a4bc8e8ec2589c427ccf9a;p=mit-scheme.git Bug: 0 * inf should be NaN, but if the 0 is exact it gives 0. --- diff --git a/tests/runtime/test-arith.scm b/tests/runtime/test-arith.scm index c3033b9c2..3d634288c 100644 --- a/tests/runtime/test-arith.scm +++ b/tests/runtime/test-arith.scm @@ -126,6 +126,14 @@ USA. (vector (flo:-inf.0) -2. -1 -0. 0 +0. +1 +2. (flo:+inf.0)) (lambda (v) (assert-nan (/ v (flo:nan.0))))) +(define-enumerated-test 'inf*0-exact + (vector (list 0 (flo:+inf.0)) + (list 0 (flo:-inf.0)) + (list (flo:+inf.0) 0) + (list (flo:-inf.0) 0)) + (lambda (l) + (expect-failure (lambda () (assert-nan (apply * l)))))) + (define-enumerated-test 'flo:ulp (vector (vector (flo:-inf.0) (flo:+inf.0))