When the argument to the floating-point precision version of the exponential integral function is a NaN, a hang is
caused. The mp version returns NaN.
Python 3.6.8 (default, Oct 7 2019, 12:59:55)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from mpmath import *
>>> import numpy as np
>>> fp.ei(np.nan)
^CTraceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jvanover/.local/lib/python3.6/site-packages/mpmath/functions/expintegrals.py", line 290, in ei
return ctx._ei(z)
File "/home/jvanover/.local/lib/python3.6/site-packages/mpmath/math2.py", line 574, in ei
ref = ei_asymp(zref, _e1)
File "/home/jvanover/.local/lib/python3.6/site-packages/mpmath/math2.py", line 509, in ei_asymp
s += t
KeyboardInterrupt
mpmath version: 1.1.0
When the argument to the floating-point precision version of the exponential integral function is a NaN, a hang is
caused. The mp version returns NaN.
Example: