From 575cd55c67b5453939d5753a7deb4017daabd60f Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Sun, 21 Oct 2018 07:21:32 +0000 Subject: [PATCH] Simplify 5*eps and assume the number of digits we wrote down. --- tests/runtime/test-arith.scm | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/tests/runtime/test-arith.scm b/tests/runtime/test-arith.scm index b8dee7d12..973137873 100644 --- a/tests/runtime/test-arith.scm +++ b/tests/runtime/test-arith.scm @@ -203,20 +203,19 @@ USA. (lambda (v) (let ((x (vector-ref v 0)) (p (vector-ref v 1)) - (t (vector-ref v 2)) - (maxerr (* 5 microcode-id/floating-epsilon))) - (assert->= maxerr (relerr p (logistic x))) + (t (vector-ref v 2))) + (assert->= 1e-15 (relerr p (logistic x))) (if (and (not (= p 0)) (not (= p 1))) - (assert->= maxerr (relerr x (logit p)))) + (assert->= 1e-15 (relerr x (logit p)))) (if (< p 1) (begin - (assert->= maxerr (relerr (- 1 p) (logistic (- x)))) + (assert->= 1e-15 (relerr (- 1 p) (logistic (- x)))) (if (< (- 1 p) 1) - (assert->= maxerr (relerr (- x) (logit (- 1 p)))))) + (assert->= 1e-15 (relerr (- x) (logit (- 1 p)))))) (assert->= 1e-300 (logistic (- x)))) - (assert->= maxerr (relerr t (log-logistic x))) + (assert->= 1e-15 (relerr t (log-logistic x))) (if (<= x 709) - (assert->= maxerr (relerr x (logit-exp t)))) + (assert->= 1e-15 (relerr x (logit-exp t)))) (if (< p 1) - (assert->= maxerr (relerr (log1p (- p)) (log-logistic (- x)))))))) \ No newline at end of file + (assert->= 1e-15 (relerr (log1p (- p)) (log-logistic (- x)))))))) \ No newline at end of file -- 2.25.1