2012/4/18 ???? <yasuaki.honda at gmail.com>
> Hi Ray san,
>
>
> > Why the discontinuity on the imaginary axis? Why a radius of 2? Does
> this improve accuracy?
>
>> There is a point between the radius 1 and 2 simicircles in left half
>>> plane where continued fraction expansion does not converge. So, I picked up
>>> a larger radius. I have not investigated the cf-expansion's convergence
>>> region in detail.
>>>
>>> Do you have an example where the continued fraction does not converge?
>> I looked at A&S 5.1.22 for the continued fraction and it says it converges
>> for |arg(z)|<pi, it seems that we could just use the fraction for |z| > 1
>> and |arg(z)| < .9*pi.
>>
>
> That was my original thought, too. However,
> expintegral_e(1,-1.700598-0.612828*%i); will not converge if you use
> continued fraction expansion. Here is the error message:
> (%i7) expintegral_e(1,-1.700598-0.612828*%i);
>
> expintegral_e: continued fractions failed.#C(-1.700598 -0.612828)
> -- an error. To debug this try: debugmode(true);
>
> Note that abs(-1.700598-0.612828*%i) is around 1.8 .
>
And that the phase is just less than .9*pi so we would apply the continued
fraction.
It would be useful to add this case to the tests, in case someone forgets
why the left and right half-planes have different regions.
I'm quite happy with your patch so feel free to apply it whenever you want.
Thanks for being so patient and answering my questions.
Ray