From 4689582a98fe2967813dadeff238aa14eef2cd74 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Sun, 18 Nov 2018 06:05:10 +0000 Subject: [PATCH] Some more atan tests for real values. --- tests/runtime/test-arith.scm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/runtime/test-arith.scm b/tests/runtime/test-arith.scm index 852f95617..b16802a4f 100644 --- a/tests/runtime/test-arith.scm +++ b/tests/runtime/test-arith.scm @@ -478,8 +478,18 @@ USA. (lambda () (assert-eqv (atan 0) 0))) +(define (rsqrt x) + (/ 1 (sqrt x))) + (define-enumerated-test 'atan (vector + (vector (- 2 (sqrt 3)) (/ 3.1415926535897932 12)) + (vector (- (sqrt 2) 1) (/ 3.1415926535897932 8)) + (vector (rsqrt 3) (/ 3.1415926535897932 6)) + (vector 1 (/ 3.1415926535897932 4)) + (vector (sqrt 3) (/ 3.1415926535897932 3)) + (vector (+ (sqrt 2) 1) (* 3.1415926535897932 3/8)) + (vector (+ 2 (sqrt 3)) (* 3.1415926535897932 5/12)) (vector +2i +1.5707963267948966+.5493061443340549i) (vector +0.+2i +1.5707963267948966+.5493061443340549i) (vector -0.+2i -1.5707963267948966+.5493061443340549i) -- 2.25.1