dzhang314 / MultiFloats.jl

Fast, SIMD-accelerated extended-precision arithmetic for Julia
MIT License
77 stars 10 forks source link

Inf + 1 returns NaN #13

Closed mtanneau closed 3 years ago

mtanneau commented 3 years ago

There seems to be something wrong with how Inf is treated when higher precision is used:

julia> Float64x1(-Inf) - 1
-Inf
julia> Float64x2(-Inf) - 1  # Same happens for Float64x3, etc
NaN

and

julia> Float64x1(Inf) + 1
Inf
julia> Float64x2(Inf) + 1  # Same happens for Float64x3, etc
NaN
dzhang314 commented 3 years ago

Hey @mtanneau , the remarks from the comment I left on your other issue also apply here. Adding the link for reference.