JuliaStats / LogExpFunctions.jl

Julia package for various special functions based on `log` and `exp`.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

xexpy(0, 1000) should be zero

cossio opened this issue · comments

julia> xexpy(0, 1000)
NaN

I think xexpy can handle this better and return zero?

Why should it be 0? At least the current implementation agrees with the docstring.

Mathematically, 0 * exp(1000) = 0. Why should it not be zero?

I also think that we should make xexpy finite if y is finite and x is zero. The purpose of writing a function is precisely to handle these kind of cases.

Fixed by #80.