Julia floating point numbers have two
zeros, 0.0 (represents positive zero), -0.0 (represents negative zero). Ideally
these two values are equal, but have different representation while storing.
julia> bits(0.0) "0000000000000000000000000000000000000000000000000000000000000000" julia> bits(-0.0) "1000000000000000000000000000000000000000000000000000000000000000" julia> 0.0==-0.0 true
No comments:
Post a Comment