Jeffrey Sarnoff
Jeffrey Sarnoff
This is a deep, heavily called function. I need to see if there is a way to resolve the issue that is less impactful.
Fortunately, this anomaly is not pervasive. ``` julia> exp(Double64(1e300)) Inf julia> tanpi(Double64(1/2)) Inf ``` If the behavior is limited to one or just a few functions, it makes more sense...
This issue is based in a corner case for multiplication or squaring, when the magnitudes get huge: ``` julia> a=Double64(sqrt(floatmax(Float64))) 1.3407807929942596e154 julia> a*a 1.7976931348623155e308 julia> a=Double64(1.000000000000001*sqrt(floatmax(Float64))) 1.340780792994261e154 julia> a*a NaN...
That is clear, and helpful.
I found the problem -- when the result is Inf the Double64 computation can result in HILO(result) == (Inf, -Inf) [or (-Inf, Inf) which prints as NaN when it should...
*THIS IS INCORRECT, see next* The results need to be remade -- or something else modified ``` julia> exp(Double64(Inf)) Inf julia> exp(Double64((Inf,-Inf)) # !! incorrect initialization NaN julia> dump(ans) Double64...
Ignore last comment -- ``` julia> b=Double64(Inf,-Inf) Inf julia> HILO(b) (Inf, -Inf) julia> exp(b) Inf ```
still though, there is the problem you highlighted .. and unfortunately not a string display issue ``` a = floatmax(Float64) b = floatmax(Double64) julia> a = floatmax(Float64) 1.7976931348623157e308 julia> b...
It appears that I have to check for `Inf` after the initial arithmetic operation (establishing the HI part) and return that immediately in the event it is +/- Inf (or...