DoubleFloats.jl
DoubleFloats.jl copied to clipboard
sqrt(NaN)
Is this the expected result?
# DoubleFloats v1.3.8
sqrt(zero(Double64) / 0)
ERROR: DomainError with sqrt(x) expects x >= 0:
Differs from earlier version and Float64:
# DoubleFloats v1.3.6
sqrt(zero(Double64) / 0)
NaN
sqrt(zero(Float64) / 0)
NaN
hmm
Here's a comparision with some other extended precision floating point data types:
using Quadmath
using MultiFloats
using DoubleFloats
f(::Type{T}) where {T} = sqrt(zero(T) / zero(T))
f(Float64) # NaN
f(BigFloat) # NaN
f(Float128) # -nan
f(Float64x2) # NaN
f(Double64) # ERROR: DomainError with sqrt(x) expects x >= 0
Yes -- I have been involved elsewhere, apologies for the delay.
On Mon, Jun 17, 2024 at 6:22 PM GregPlowman @.***> wrote:
Here's a comparision with some other extended precision floating point data types:
using Quadmath using MultiFloats using DoubleFloats
f(::Type{T}) where {T} = sqrt(zero(T) / zero(T))
f(Float64) # NaN f(BigFloat) # NaN f(Float128) # -nan f(Float64x2) # NaN f(Double64) # ERROR: DomainError with sqrt(x) expects x >= 0
— Reply to this email directly, view it on GitHub https://github.com/JuliaMath/DoubleFloats.jl/issues/201#issuecomment-2174534015, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAM2VRWXVY7IJ5QRBTM5ZZTZH5OQVAVCNFSM6AAAAABGSI7FL2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZUGUZTIMBRGU . You are receiving this because you commented.Message ID: @.***>
I am spending time to get the current nits in DoubleFloats and one or two other packages resolved before JuliaCon. This problem arose with the merging of another PR. I will get it fixed or undo that PR this week.
On Mon, Jun 17, 2024 at 6:34 PM Jeffrey Sarnoff @.***> wrote:
Yes -- I have been involved elsewhere, apologies for the delay.
On Mon, Jun 17, 2024 at 6:22 PM GregPlowman @.***> wrote:
Here's a comparision with some other extended precision floating point data types:
using Quadmath using MultiFloats using DoubleFloats
f(::Type{T}) where {T} = sqrt(zero(T) / zero(T))
f(Float64) # NaN f(BigFloat) # NaN f(Float128) # -nan f(Float64x2) # NaN f(Double64) # ERROR: DomainError with sqrt(x) expects x >= 0
— Reply to this email directly, view it on GitHub https://github.com/JuliaMath/DoubleFloats.jl/issues/201#issuecomment-2174534015, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAM2VRWXVY7IJ5QRBTM5ZZTZH5OQVAVCNFSM6AAAAABGSI7FL2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZUGUZTIMBRGU . You are receiving this because you commented.Message ID: @.***>