Changeset 235ac2e4756b7c3f03815b267d292a26e8e1df37
- Timestamp:
- 04/12/12 14:37:27 (14 months ago)
- Author:
- Raymond Toy <toy.raymond@…>
- Children:
- 5daefcc43f8b88741634f7a982bdb8b976739a1c
- Parents:
- 0823acf49a91cbdb9a3e7f1faae2efe128580038
- git-committer:
- Raymond Toy <toy.raymond@…> (04/12/12 14:37:27)
- Message:
-
Fix for complex args.
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r9fd2eb
|
r235ac2
|
|
| 184 | 184 | (let* ((iz (* #c(0 1) z)) |
| 185 | 185 | (i+ (exp-arc-i-2 iz v))) |
| 186 | | (cond ((= v (ftruncate v)) |
| | 186 | (cond ((and (= v (ftruncate v)) (realp z)) |
| 187 | 187 | ;; We can simplify the result |
| 188 | | (let ((c (cis (* v (float-pi i+) -1/2)))) |
| | 188 | (let ((c (exp (* v (float-pi i+) #c(0 -1/2))))) |
| 189 | 189 | (/ (+ (* c i+) |
| 190 | 190 | (* (conjugate c) (conjugate i+))) |
| … |
… |
|
| 193 | 193 | (t |
| 194 | 194 | (let ((i- (exp-arc-i-2 (- iz ) v))) |
| 195 | | (/ (+ (* (cis (* v (float-pi i+) -1/2)) |
| | 195 | (/ (+ (* (exp (* v (float-pi i+) #c(0 -1/2))) |
| 196 | 196 | i+) |
| 197 | | (* (cis (* v (float-pi i+) 1/2)) |
| | 197 | (* (exp (* v (float-pi i+) #c(0 1/2))) |
| 198 | 198 | i-)) |
| 199 | 199 | (float-pi i+) |
| … |
… |
|
| 395 | 395 | (an-clrhash) |
| 396 | 396 | (%big-a-clrhash) |
| 397 | | (cond ((= vv v) |
| 398 | | ;; v is an integer |
| | 397 | (cond ((and (= vv v) (realp z)) |
| | 398 | ;; v is an integer and z is real |
| 399 | 399 | (integer-bessel-j-exp-arc v z)) |
| 400 | 400 | (t |
| … |
… |
|
| 403 | 403 | (vpi (* v (float-pi (realpart z))))) |
| 404 | 404 | (+ (integer-bessel-j-exp-arc v z) |
| 405 | | (* z |
| 406 | | (/ (sin vpi) vpi) |
| 407 | | (+ (/ -1 z) |
| 408 | | (sum-ab big-n v z) |
| 409 | | (sum-big-ia big-n v z))))))))) |
| | 405 | (if (= vv v) |
| | 406 | 0 |
| | 407 | (* z |
| | 408 | (/ (sin vpi) vpi) |
| | 409 | (+ (/ -1 z) |
| | 410 | (sum-ab big-n v z) |
| | 411 | (sum-big-ia big-n v z)))))))))) |
| 410 | 412 | |
| 411 | 413 | ;; Bessel Y |