Changeset cb1a5d
 Timestamp:
 04/09/12 15:52:08 (3 years ago)
 Branches:
 master
 Children:
 f8943a
 Parents:
 6cfb0a
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

qdgamma.lisp
r6cfb0a rcb1a5d 533 533 ;; 534 534 ;; 535 (let* ((prec (floatcontagion v z)) 536 (v (applycontagion v prec)) 537 (z (applycontagion z prec))) 535 (withfloatingpointcontagion (v z) 538 536 (cond ((and (realp v) (minusp v)) 539 537 ;; E(v, z) = z^(v1)*incomplete_gamma_tail(v+1,z) … … 541 539 (* (expt z ( v 1)) 542 540 (incompletegammatail (+ v 1) z)))) 543 ((< (abs z) 1) 544 ;; Use series for small z 541 ((or (< (abs z) 1) (>= (abs (phase z)) 3.1)) 542 ;; Use series for small z or if z is near the negative real 543 ;; axis because the continued fraction does not converge on 544 ;; the negative axis and converges slowly near the negative 545 ;; axis. 545 546 (sexpintegrale v z)) 546 ((>= (abs (phase z)) 3.1) 547 ;; The continued fraction doesn't converge on the negative 548 ;; real axis, and converges very slowly near the negative 549 ;; real axis, so use the incompletegammatail function in 550 ;; this region. "Closeness" to the negative real axis is 551 ;; teken to mean that z is in a sector near the axis. 552 ;; 553 ;; E(v,z) = z^(v1)*incomplete_gamma_tail(1v,z) 554 (* (expt z ( v 1)) 555 (incompletegammatail (+ v 1) z)))) 556 ((or (< (abs z) 1) (>= (abs (phase z)) 3.1)) 557 ;; Use series for small z or if z is near the negative real 558 ;; axis because the continued fraction does not converge on 559 ;; the negative axis and converges slowly near the negative 560 ;; axis. 561 (sexpintegrale v z)) 562 (t 563 ;; Use continued fraction for everything else. 564 (cfexpintegrale v z)))) 547 (t 548 ;; Use continued fraction for everything else. 549 (cfexpintegrale v z))))) 565 550 566 551 ;; Series for Fresnel S
Note: See TracChangeset
for help on using the changeset viewer.