Changeset d795ba718dc53f591c82994811f50250aceec1d7
- Timestamp:
- 04/11/12 20:15:47 (14 months ago)
- Author:
- Raymond Toy <toy.raymond@…>
- Children:
- 6ab5226ca3e32b443d87934ec138ff0efc8aaecc
- Parents:
- c0e12ddf6b61f571555d46c6f168e6bebabc80b1
- git-committer:
- Raymond Toy <toy.raymond@…> (04/11/12 20:15:47)
- Message:
-
Add TODO list for bessel-j.
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
rc0e12d
|
rd795ba
|
|
| 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))) |
| … |
… |
|
| 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))))) |