On Wednesday, June 4, 2014 2:54:22 AM UTC-4, Hans W Borchers wrote:
>
> Well, if only double precision is requested, you can compute E1 (or Ei) 
> for real x in,
> say, 20 lines of julia code, using a combined approach of series expansion 
> and continued
> fractions -- see Abramowitz and Stegun, Chapter 5. The other one, Ei or 
> E1, is then given 
> by the equation above.
>
>
For real arguments, I would guess that you can do better than this using a 
minimax rational approximant combined with a coordinate transformation; in 
my experience, this is typically faster at a fixed precision than using 
convergent series or continued fractions.   (Maple or Mathematica can spit 
out the optimal approximant for you.)    On the other hand, it would be 
nice to support complex arguments as well, and for that you typically need 
a combination of convergent series, asymptotic series, and/or 
continued-fractions in different parts of the domain.   And then if you 
want E_n rather than just E_1, there are additional complications.

I opened an issue for this:  https://github.com/JuliaLang/julia/issues/7089

Reply via email to