You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I frequently encounter the function xexpx(z) = z * exp(z), with the caveat that xexpx(-Inf) == 0. Thus xexpx(z) = xlogx(exp(z)), but computing it directly is faster because it avoids a superfluous log call and might prevent intermediate overflows..
Can we consider adding the definition:
xexpx(x::Real) = x == -Inf ? exp(x) : x * exp(x)
The text was updated successfully, but these errors were encountered:
I frequently encounter the function
xexpx(z) = z * exp(z)
, with the caveat thatxexpx(-Inf) == 0
. Thusxexpx(z) = xlogx(exp(z))
, but computing it directly is faster because it avoids a superfluouslog
call and might prevent intermediate overflows..Can we consider adding the definition:
The text was updated successfully, but these errors were encountered: