-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Checking foo() === NaN is brittle #1055
Comments
I see why we should fix this in the package, but on the Julia side, isn't it a breaking change to now return false on |
So julia> nan1 = reinterpret(Float64, 0x7ff8000000000000)
NaN
julia> nan2 = reinterpret(Float64, 0x7ff8000000000001)
NaN
julia> nan1 === nan2
false but what have changed in Julia 1.4 that could cause this? To clarify, the example here also returns |
JuliaLang/julia#34405 might make this not happen anymore but haven't checked. |
interesting, I thought NaN was a unique bit value, well TIL. |
Tests for Distributions.jl fails on Julia master likely due to the type of NaN that is generated.
===
on NaN will do a bitwise check. It is likely the tests should useisnan
.The text was updated successfully, but these errors were encountered: