From 367c0e2e38b08f50d2a4bc8e8ec2589c427ccf9a Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Sun, 18 Nov 2018 01:36:25 +0000 Subject: [PATCH] Bug: 0 * inf should be NaN, but if the 0 is exact it gives 0. --- tests/runtime/test-arith.scm | 8 ++++++++ 1 file changed, 8 insertions(+) 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)) -- 2.25.1