[SciPy-user] exponential integral behaviour near -20

Robert Kern robert.kern@gmail....
Mon Dec 15 23:02:30 CST 2008


On Mon, Dec 15, 2008 at 22:39, David Joyner <wdj@usna.edu> wrote:
> Hi:
>
> A user reported a bug on the sage-support list (Sage, www.sagemath.org, includes scipy) for the exponential
> integral. This seems to illustrate the idea:
>
>>>> import scipy.special, math
>>>> -scipy.special.exp1(-complex(19.9999990))
> (25615628.4058083-3.1415926535897931j)
>>>> -scipy.special.exp1(-complex(19.9999991))
> (25615624.582086116+3.1415926535897931j)
>
> Any ideas on what would cause this?

I cannot replicate this on OS X with a recent(ish) SVN scipy compiled
with gfortran 4.2.1. This function is implemented in FORTRAN, so the
FORTRAN compiler used may be relevant. Can you give us more
information about the platform, scipy version, and FORTRAN compiler?

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco


More information about the SciPy-user mailing list