From: Taylor R Campbell Date: Sun, 30 Jun 2019 19:49:19 +0000 (+0000) Subject: flo:ulp is busted on NaN. X-Git-Tag: mit-scheme-pucked-10.1.12~7^2~32 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=a33da0a2c3813cd29cf2710ad509e8225b1b7033;p=mit-scheme.git flo:ulp is busted on NaN. --- 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.)