Fix sense of test. Do this part only if 1 - p is guaranteed exact.
authorTaylor R Campbell <campbell@mumble.net>
Thu, 25 Oct 2018 01:42:22 +0000 (01:42 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Thu, 25 Oct 2018 01:48:46 +0000 (01:48 +0000)
tests/runtime/test-arith.scm

index 973137873ca939974059bde12ea11492a618f4b7..ea5a6a1cd5d2fc9954462331589429a943d74542 100644 (file)
@@ -211,7 +211,7 @@ USA.
       (if (< p 1)
           (begin
             (assert->= 1e-15 (relerr (- 1 p) (logistic (- x))))
-            (if (< (- 1 p) 1)
+            (if (<= 1/2 p)
                 (assert->= 1e-15 (relerr (- x) (logit (- 1 p))))))
           (assert->= 1e-300 (logistic (- x))))
       (assert->= 1e-15 (relerr t (log-logistic x)))