Changeset cb1a5d41baf9d4db12a2563a230d0a1e55c8adea
 Timestamp:
 04/09/12 08:52:08 (2 years ago)
 Author:
 Raymond Toy <rtoy@…>
 Children:
 f8943af6bff60e23d679089db5207b4834aa83ff
 Parents:
 6cfb0ac4b6bcc1a25bc119e87fd2b57bfa1f4355
 gitcommitter:
 Raymond Toy <rtoy@…> (04/09/12 08:52:08)
 Message:

Fix some mistakes in expintegrale when changing algorithm to use
series.
 Files:

Legend:
 Unmodified
 Added
 Removed

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 