Changeset d80256d66d585a69813f277b115d039cc620e62d
- Timestamp:
- 03/23/12 13:00:24 (15 months ago)
- Author:
- Raymond Toy <rtoy@…>
- Children:
- 41f1ca3edadee2d6e00ba7dc287ea66d92897ca6
- Parents:
- b1ae6953934670284060ffc2810e424a5e0aac71
- git-committer:
- Raymond Toy <rtoy@…> (03/23/12 13:00:24)
- Message:
-
Need to apply contagion for exp-integral-e.
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
rb1ae69
|
rd80256
|
|
| 529 | 529 | ;; |
| 530 | 530 | ;; |
| 531 | | (cond ((and (realp v) (minusp v)) |
| 532 | | ;; E(-v, z) = z^(-v-1)*incomplete_gamma_tail(v+1,z) |
| 533 | | (let ((-v (- v))) |
| | 531 | (let* ((prec (float-contagion v z)) |
| | 532 | (v (apply-contagion v prec)) |
| | 533 | (z (apply-contagion z prec))) |
| | 534 | (cond ((and (realp v) (minusp v)) |
| | 535 | ;; E(-v, z) = z^(-v-1)*incomplete_gamma_tail(v+1,z) |
| | 536 | (let ((-v (- v))) |
| | 537 | (* (expt z (- v 1)) |
| | 538 | (incomplete-gamma-tail (+ -v 1) z)))) |
| | 539 | ((< (abs z) 1) |
| | 540 | ;; Use series for small z |
| | 541 | (s-exp-integral-e v z)) |
| | 542 | ((>= (abs (phase z)) 3.1) |
| | 543 | ;; The continued fraction doesn't converge on the negative |
| | 544 | ;; real axis, and converges very slowly near the negative |
| | 545 | ;; real axis, so use the incomplete-gamma-tail function in |
| | 546 | ;; this region. "Closeness" to the negative real axis is |
| | 547 | ;; teken to mean that z is in a sector near the axis. |
| | 548 | ;; |
| | 549 | ;; E(v,z) = z^(v-1)*incomplete_gamma_tail(1-v,z) |
| 534 | 550 | (* (expt z (- v 1)) |
| 535 | | (incomplete-gamma-tail (+ -v 1) z)))) |
| 536 | | ((< (abs z) 1) |
| 537 | | ;; Use series for small z |
| 538 | | (s-exp-integral-e v z)) |
| 539 | | ((>= (abs (phase z)) 3.1) |
| 540 | | ;; The continued fraction doesn't converge on the negative |
| 541 | | ;; real axis, and converges very slowly near the negative |
| 542 | | ;; real axis, so use the incomplete-gamma-tail function in |
| 543 | | ;; this region. "Closeness" to the negative real axis is |
| 544 | | ;; teken to mean that z is in a sector near the axis. |
| 545 | | ;; |
| 546 | | ;; E(v,z) = z^(v-1)*incomplete_gamma_tail(1-v,z) |
| 547 | | (* (expt z (- v 1)) |
| 548 | | (incomplete-gamma-tail (- 1 v) z))) |
| 549 | | (t |
| 550 | | ;; Use continued fraction for everything else. |
| 551 | | (cf-exp-integral-e v z)))) |
| | 551 | (incomplete-gamma-tail (- 1 v) z))) |
| | 552 | (t |
| | 553 | ;; Use continued fraction for everything else. |
| | 554 | (cf-exp-integral-e v z))))) |
| 552 | 555 | |
| 553 | 556 | ;; Series for Fresnel S |