expintegral_ei() bug on convergence



Dear Ray san,

Thanks for your questions. I will anser them inline below.

2012/04/17 3:32 "Raymond Toy" <toy.raymond at gmail.com>:
>
>
>
> 2012/4/16 ???? <yasuaki.honda at gmail.com>
>>
>>
>> So, if everyone is OK with these changes, I will submit it to the git
server.
>
>
> I'm happy with these changes but I have a few minor questions.
>
>>
>>
>>      (cond
>> -      ((and (>= (realpart z) 0) (> (abs z) 1.0))
>> +      ((or (and (> (abs z) 2) (< (abs (phase z)) (* pi 0.9)))
>> +          (and (>= (realpart z) 0) (> (abs z) 1.0)))
>
>
> These conditions seem a little strange. So basically the boundary of the
region looks like a semicircle of radius 1 for the right half-plane and a
semicircle of radius 2 for the left half-plane with a sector taken out near
the negative real axis.
>
> 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.

>
> (It might be useful to add a comment that pi*.9 is needed to pass the
testsuite.  Values bigger than .9 (roughly) cause tests to fail, right?

That is right. There may be some room (0.01 or 0.02) for improvement,
though.

>
> Ray
>