You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the latest commit I switched to use === instead of ==, mainly because the comparison of decorated intervals ignores the decoration part. This helped revealing a couple of bugs that have been silent in IntervalArithmetic so far, e.g.
As a downside, since 0.0 === -0.0 evaluates to false, now a few more tests fail, e.g.
julia> @test +(interval(-0.0,2.0)) === Interval(0.0,2.0)
Test Failed at REPL[36]:1
Expression: +(interval(-0.0, 2.0)) === Interval(0.0, 2.0)
Evaluated: [-0, 2] === [0, 2]
ERROR: There was an error during testing
julia> @test +(interval(-0.0, 2.0)) == Interval(0.0, 2.0)
Test Passed
I am not sure what the standard says about +0.0 vs -0.0, so I am not sure what to think about this.
One alternative would be to modify the parser so that whenever it encounters an expression in the form something == DecoratedInterval(something) then it creates the test something == DecoratedInterval(something) && decoration(something) == decoration(DecoratedInterval(something))
The text was updated successfully, but these errors were encountered:
Among other things in JuliaIntervals/IntervalArithmetic.jl#271, I plan to introduce a new symbol for interval equality (X ≛ Y) to represent isEqual as defined in the standard.
This should solve the problem you have here as well.
In the latest commit I switched to use
===
instead of==
, mainly because the comparison of decorated intervals ignores the decoration part. This helped revealing a couple of bugs that have been silent in IntervalArithmetic so far, e.g.As a downside, since
0.0 === -0.0
evaluates to false, now a few more tests fail, e.g.I am not sure what the standard says about +0.0 vs -0.0, so I am not sure what to think about this.
One alternative would be to modify the parser so that whenever it encounters an expression in the form
something == DecoratedInterval(something)
then it creates the testsomething == DecoratedInterval(something) && decoration(something) == decoration(DecoratedInterval(something))
The text was updated successfully, but these errors were encountered: