JuliaMath / SpecialFunctions.jl

Special mathematical functions in Julia
https://specialfunctions.juliamath.org/stable/
Other
352 stars 98 forks source link

Large negative real number arguments return NaN for expintx #457

Open weymouth opened 8 months ago

weymouth commented 8 months ago

expintx(complex(-x)) returns NaN for x more than around 700. It's almost like this is being handled by -exp(-x)*expinti(x) and we're getting an overflow error.

ararslan commented 8 months ago

It seems to be about -709.782712894 at which point the result goes from roughly -0.00141087244 + 1e-308*im to -Inf + NaN*im.