[oct-scm] [oct-git]OCT: A portable Lisp implementation for quad-double precision floats branch master updated. 5566bc397937c2e8979ee6847e8f59f279f1f643
Raymond Toy
rtoy at common-lisp.net
Fri Apr 13 16:09:42 UTC 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "OCT: A portable Lisp implementation for quad-double precision floats".
The branch, master has been updated
via 5566bc397937c2e8979ee6847e8f59f279f1f643 (commit)
via 2f48eb872f71a8f41187decbc57878cb67fa86de (commit)
from 5daefcc43f8b88741634f7a982bdb8b976739a1c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 5566bc397937c2e8979ee6847e8f59f279f1f643
Author: Raymond Toy <toy.raymond at gmail.com>
Date: Thu Apr 12 23:24:03 2012 -0700
Add more tests for Bessel J. Not all of them pass.
diff --git a/rt-tests.lisp b/rt-tests.lisp
index a4dac02..5b9f5ad 100644
--- a/rt-tests.lisp
+++ b/rt-tests.lisp
@@ -1673,28 +1673,54 @@
nil)
;; Bessel J for complex args
-(rt:deftest bessel-j-complex.pos-order.d.1
+(rt:deftest bessel-j-complex-arg.d.1
(let ((b (bessel-j 0d0 #c(1d0 1)))
(true #c(0.9376084768060293d0 -0.4965299476091221d0)))
(check-accuracy 50.73 b true))
nil)
-(rt:deftest bessel-j-complex.pos-order.d.2
+(rt:deftest bessel-j-complex-arg.d.2
(let ((b (bessel-j 1d0 #c(1d0 1)))
(true #c(0.6141603349229036d0 0.3650280288270878d0)))
(check-accuracy 52.51 b true))
nil)
-(rt:deftest bessel-j-complex.pos-order.d.3
+(rt:deftest bessel-j-complex-arg.d.3
(let ((b (bessel-j 2d0 #c(1d0 1)))
(true #c(0.0415798869439621d0 0.2473976415133063d0)))
(check-accuracy 50.41 b true))
nil)
-#+nil
-(rt:deftest bessel-j-complex.pos-order.d.4
+(rt:deftest bessel-j-complex-arg.d.4
(let ((b (bessel-j 2.3d0 #c(1d0 1)))
+ (true #c(-0.0141615213034667d0 0.1677798241687935d0)))
+ (check-accuracy 48.56 b true))
+ nil)
+
+(rt:deftest bessel-j-complex-arg.d.5
+ (let ((b (bessel-j -2.3d0 #c(1d0 1)))
(true #c(0.1920598664138632d0 -0.5158676904105332d0)))
- (check-accuracy 53 b true))
+ (check-accuracy 50.97 b true))
nil)
+(rt:deftest bessel-j-1/2-complex.d.1
+ (loop for k from 0 below 10
+ for x = (complex (random (/ pi 2))
+ (random (/ pi 2)))
+ for b = (bessel-j 0.5d0 x)
+ for true = (* (/ (sin x) (sqrt x)) (sqrt (/ 2 pi)))
+ for result = (check-accuracy 49.8 b true)
+ when result
+ append (list (list (list k x) result)))
+ nil)
+
+(rt:deftest bessel-j-1/2-complex.q.1
+ (loop for k from 0 below 10
+ for x = (complex (random (/ (float-pi #q1) 2))
+ (random (/ (float-pi #q1) 2)))
+ for b = (bessel-j #q0.5 x)
+ for true = (* (/ (sin x) (sqrt x)) (sqrt (/ 2 (float-pi #q1))))
+ for result = (check-accuracy 212 b true)
+ when result
+ append (list (list (list k x) result)))
+ nil)
commit 2f48eb872f71a8f41187decbc57878cb67fa86de
Author: Raymond Toy <toy.raymond at gmail.com>
Date: Thu Apr 12 18:27:08 2012 -0700
Add more tests.
diff --git a/rt-tests.lisp b/rt-tests.lisp
index 712b96c..a4dac02 100644
--- a/rt-tests.lisp
+++ b/rt-tests.lisp
@@ -1679,3 +1679,22 @@
(check-accuracy 50.73 b true))
nil)
+(rt:deftest bessel-j-complex.pos-order.d.2
+ (let ((b (bessel-j 1d0 #c(1d0 1)))
+ (true #c(0.6141603349229036d0 0.3650280288270878d0)))
+ (check-accuracy 52.51 b true))
+ nil)
+
+(rt:deftest bessel-j-complex.pos-order.d.3
+ (let ((b (bessel-j 2d0 #c(1d0 1)))
+ (true #c(0.0415798869439621d0 0.2473976415133063d0)))
+ (check-accuracy 50.41 b true))
+ nil)
+
+#+nil
+(rt:deftest bessel-j-complex.pos-order.d.4
+ (let ((b (bessel-j 2.3d0 #c(1d0 1)))
+ (true #c(0.1920598664138632d0 -0.5158676904105332d0)))
+ (check-accuracy 53 b true))
+ nil)
+
-----------------------------------------------------------------------
Summary of changes:
rt-tests.lisp | 47 ++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 46 insertions(+), 1 deletions(-)
hooks/post-receive
--
OCT: A portable Lisp implementation for quad-double precision floats
More information about the oct-cvs
mailing list