IEEE 754 less-than-or-equal predicate.
- iOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
- Xcode 8.0+
- Core Graphics
NaN compares not less than or equal to anything, including itself. -infinity compares less than or equal to everything except NaN. Everything except NaN compares less than or equal to +infinity.
Because of the existence of NaN in FloatingPoint types, trichotomy does not hold, which means that
x < y and
!(y <= x) are not equivalent. This is why
is is a separate implementation hook in the protocol.
Note that this predicate does not impose a total order. The
is predicate refines this relation so that all values are totally ordered.