### Add TODO list for bessel-j.

parent c0e12ddf
 ... @@ -375,13 +375,25 @@ ... @@ -375,13 +375,25 @@ (format t " f = ~S~%" f) (format t " f = ~S~%" f) (format t " term = ~S~%" term) (format t " term = ~S~%" term) (format t " sum = ~S~%" sum)))))) (format t " sum = ~S~%" sum)))))) ;; TODO: ;; o For |z| <= 1 use the series. ;; o Currently accuracy is not good for large z and half-integer ;; order. ;; o For real v and z, return a real number instead of complex. ;; o Handle the case of Re(z) < 0. (The formulas are for Re(z) > 0: ;; bessel_j(v,z*exp(m*%pi*%i)) = exp(m*v*%pi*%i)*bessel_j(v, z) ;; o The paper suggests using ;; bessel_i(v,z) = exp(-v*%pi*%i/2)*bessel_j(v, %i*z) ;; when Im(z) >> Re(z) ;; (defun bessel-j (v z) (defun bessel-j (v z) (let ((vv (ftruncate v))) (let ((vv (ftruncate v))) (cond ((= vv v) (cond ((= vv v) ;; v is an integer ;; v is an integer (integer-bessel-j-exp-arc v z)) (integer-bessel-j-exp-arc v z)) (t (t ;; Need to fine-tune the value of big-n. (let ((big-n 100) (let ((big-n 100) (vpi (* v (float-pi (realpart z))))) (vpi (* v (float-pi (realpart z))))) (+ (integer-bessel-j-exp-arc v z) (+ (integer-bessel-j-exp-arc v z) ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!