Open mauro3 opened 1 year ago
I had convinced myself this was impossible :(.
Perhaps this has something to do with the faulty normalization
julia> a = 0:1/24:365 - 1/48 - 0.001
0.0:0.041666666666666664:364.9583333333333
julia> b = 0:1/24:365 - 1/48
0.0:0.041666666666666664:364.9583333333333
julia> a.step
Base.TwicePrecision{Float64}(0.041666666666666664, 0.0)
julia> x = b.step
Base.TwicePrecision{Float64}(0.041666666666515084, 1.5158245029548803e-13)
julia> x.lo + x.hi
0.041666666666666664
Well found! This bug has been around since at least 1.0.
I encountered this
The things which surprised me:
a==b
true butcollect(a)==collect(b)
is falsea
andb
are not equal even thougha==b
I understand that range maths is super complicated. So this may well be expected, please close if that is the case.