[SciPy-dev] Bug in scipy.special.exp1

Patrick Perry patperry at stanford.edu
Wed Aug 30 19:17:40 CDT 2006

The following code should demonstrate the problem:

>>> special.exp1(-1)
>>> special.exp1(complex(-1))

I'm not sure why the explicit cast to complex is necessary.

Also, I barely know anything about exponential integrals, but I think it should
be the case that Ei(z) = -E1(-z).  Even though E1(z) may only be defined modulo
multiples of pi when z is complex, it might make sense to have "special.expi(x)"
return the same value as "-special.exp1(-x)" when x is real.  This is not the
current behavior:

>>> special.expi(1)

More information about the Scipy-dev mailing list