From a33da0a2c3813cd29cf2710ad509e8225b1b7033 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Sun, 30 Jun 2019 19:49:19 +0000 Subject: [PATCH] flo:ulp is busted on NaN. --- tests/runtime/test-flonum.scm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/runtime/test-flonum.scm b/tests/runtime/test-flonum.scm index 513fb196e..af2d12598 100644 --- a/tests/runtime/test-flonum.scm +++ b/tests/runtime/test-flonum.scm @@ -235,15 +235,18 @@ USA. (list 2. (* 2 flo:ulp-of-one)) (list 3. (* 2 flo:ulp-of-one)) (list (- 3. (* 2 flo:ulp-of-one)) (* 2 flo:ulp-of-one)) - (list (flo:+inf.0) (flo:+inf.0))) - (lambda (x u) + (list (flo:+inf.0) (flo:+inf.0)) + (list +nan.123 +nan.123 expect-failure)) + (lambda (x u #!optional xfail) (flo:with-trapped-exceptions 0 (lambda () (let ((u (if (string? u) (string->number u) u))) - (assert-eqv (flo:ulp x) u)))))) + (with-expected-failure xfail + (lambda () + (assert-eqv-nan (flo:ulp x) u)))))))) (define-enumerated-test 'copysign `((0. 0. 0.) -- 2.25.1