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
Moreover, intervals are comparable using >, >=, < or <=. These comparison operators have a different behaviour than the usual ones. For instance, a < b holds if a is entirely on the left of the lower bound of b and a > b holds if a is entirely on the right of the upper bound of b. [...] Similarly, a <= b holds if a is entirely on the left of the upper bound of b, and a >= b holds if a is entirely on the right of the lower bound of b. [...] Note that all these semantics differ from classical comparison operators. As a consequence, some intervals are never comparable in the classical sense.
Intervals implement the special comparison methods, but in some corner cases they behave in surprising ways:
prints:
Similarly,
prints
This violates the expectation that
(x >= y) == ((x > y) or (x == y))
.In my view the right fix is to make each of the first expressions above - that is,
b > a
anda < b
- return true for these cases.The text was updated successfully, but these errors were encountered: