Make big-n a defvar so we can change it easily.
authorRaymond Toy <toy.raymond@gmail.com>
Tue, 17 Apr 2012 02:30:12 +0000 (19:30 -0700)
committerRaymond Toy <toy.raymond@gmail.com>
Tue, 17 Apr 2012 02:30:12 +0000 (19:30 -0700)
qd-bessel.lisp

index 48a0dac..14743af 100644 (file)
 ;;      bessel_i(v,z) = exp(-v*%pi*%i/2)*bessel_j(v, %i*z)
 ;;    when Im(z) >> Re(z)
 ;; 
+(defvar *big-n* 100)
 (defun bessel-j (v z)
   (let ((vv (ftruncate v)))
     ;; Clear the caches for now.
           (integer-bessel-j-exp-arc v z))
          (t
           ;; Need to fine-tune the value of big-n.
-          (let ((big-n 10)
+          (let ((big-n *big-n*)
                 (vpi (* v (float-pi (realpart z)))))
             (+ (integer-bessel-j-exp-arc v z)
                (if (= vv v)