Changeset 5566bc


Ignore:
Timestamp:
04/13/12 06:24:03 (3 years ago)
Author:
Raymond Toy <toy.raymond@…>
Branches:
master
Children:
78801d
Parents:
2f48eb
Message:

Add more tests for Bessel J. Not all of them pass.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rt-tests.lisp

    r2f48eb r5566bc  
    16801680
    16811681;; Bessel J for complex args
    1682 (rt:deftest bessel-j-complex.pos-order.d.1
     1682(rt:deftest bessel-j-complex-arg.d.1
    16831683    (let ((b (bessel-j 0d0 #c(1d0 1)))
    16841684          (true #c(0.9376084768060293d0 -0.4965299476091221d0)))
     
    16861686  nil)
    16871687
    1688 (rt:deftest bessel-j-complex.pos-order.d.2
     1688(rt:deftest bessel-j-complex-arg.d.2
    16891689    (let ((b (bessel-j 1d0 #c(1d0 1)))
    16901690          (true #c(0.6141603349229036d0 0.3650280288270878d0)))
     
    16921692  nil)
    16931693
    1694 (rt:deftest bessel-j-complex.pos-order.d.3
     1694(rt:deftest bessel-j-complex-arg.d.3
    16951695    (let ((b (bessel-j 2d0 #c(1d0 1)))
    16961696          (true #c(0.0415798869439621d0 0.2473976415133063d0)))
     
    16981698  nil)
    16991699
    1700 #+nil
    1701 (rt:deftest bessel-j-complex.pos-order.d.4
     1700(rt:deftest bessel-j-complex-arg.d.4
    17021701    (let ((b (bessel-j 2.3d0 #c(1d0 1)))
     1702          (true #c(-0.0141615213034667d0 0.1677798241687935d0)))
     1703      (check-accuracy 48.56 b true))
     1704  nil)
     1705
     1706(rt:deftest bessel-j-complex-arg.d.5
     1707    (let ((b (bessel-j -2.3d0 #c(1d0 1)))
    17031708          (true #c(0.1920598664138632d0 -0.5158676904105332d0)))
    1704       (check-accuracy 53 b true))
    1705   nil)
    1706 
     1709      (check-accuracy 50.97 b true))
     1710  nil)
     1711
     1712(rt:deftest bessel-j-1/2-complex.d.1
     1713    (loop for k from 0 below 10
     1714          for x = (complex (random (/ pi 2))
     1715                           (random (/ pi 2)))
     1716          for b = (bessel-j 0.5d0 x)
     1717          for true = (* (/ (sin x) (sqrt x)) (sqrt (/ 2 pi)))
     1718          for result = (check-accuracy 49.8 b true)
     1719          when result
     1720            append (list (list (list k x) result)))
     1721  nil)
     1722
     1723(rt:deftest bessel-j-1/2-complex.q.1
     1724    (loop for k from 0 below 10
     1725          for x = (complex (random (/ (float-pi #q1) 2))
     1726                           (random (/ (float-pi #q1) 2)))
     1727          for b = (bessel-j #q0.5 x)
     1728          for true = (* (/ (sin x) (sqrt x)) (sqrt (/ 2 (float-pi #q1))))
     1729          for result = (check-accuracy 212 b true)
     1730          when result
     1731            append (list (list (list k x) result)))
     1732  nil)
Note: See TracChangeset for help on using the changeset viewer.