Commit d795ba718dc53f591c82994811f50250aceec1d7

Authored by Raymond Toy
1 parent c0e12ddf

Add TODO list for bessel-j.

Showing 1 changed file with 13 additions and 1 deletions
qd-bessel.lisp
... ... @@ -375,13 +375,25 @@
375 375 (format t " f = ~S~%" f)
376 376 (format t " term = ~S~%" term)
377 377 (format t " sum = ~S~%" sum))))))
378   -
  378 +
  379 +;; TODO:
  380 +;; o For |z| <= 1 use the series.
  381 +;; o Currently accuracy is not good for large z and half-integer
  382 +;; order.
  383 +;; o For real v and z, return a real number instead of complex.
  384 +;; o Handle the case of Re(z) < 0. (The formulas are for Re(z) > 0:
  385 +;; bessel_j(v,z*exp(m*%pi*%i)) = exp(m*v*%pi*%i)*bessel_j(v, z)
  386 +;; o The paper suggests using
  387 +;; bessel_i(v,z) = exp(-v*%pi*%i/2)*bessel_j(v, %i*z)
  388 +;; when Im(z) >> Re(z)
  389 +;;
379 390 (defun bessel-j (v z)
380 391 (let ((vv (ftruncate v)))
381 392 (cond ((= vv v)
382 393 ;; v is an integer
383 394 (integer-bessel-j-exp-arc v z))
384 395 (t
  396 + ;; Need to fine-tune the value of big-n.
385 397 (let ((big-n 100)
386 398 (vpi (* v (float-pi (realpart z)))))
387 399 (+ (integer-bessel-j-exp-arc v z)
... ...