pub enum FloatPred {
Show 16 variants
False,
Oeq,
Ogt,
Oge,
Olt,
Ole,
One,
Ord,
Uno,
Ueq,
Ugt,
Uge,
Ult,
Ule,
Une,
True,
}Expand description
The floating point comparisons, ordered and unordered.
An ordered predicate is false if either operand is a NaN, and an unordered one is true. C’s
< is olt and C’s != is une, which is the whole of why both families are here.
Variants§
False
Always false.
Oeq
Ordered and equal.
Ogt
Ordered and greater than.
Oge
Ordered and greater than or equal.
Olt
Ordered and less than.
Ole
Ordered and less than or equal.
One
Ordered and not equal.
Ord
Ordered, which is to say neither operand is a NaN.
Uno
Unordered, which is to say one of them is.
Ueq
Unordered or equal.
Ugt
Unordered or greater than.
Uge
Unordered or greater than or equal.
Ult
Unordered or less than.
Ule
Unordered or less than or equal.
Une
Unordered or not equal.
True
Always true.
Implementations§
Source§impl FloatPred
impl FloatPred
Sourcepub const fn swapped(self) -> Self
pub const fn swapped(self) -> Self
The predicate that holds when the operands are given the other way round.
Sourcepub const fn is_ordered(self) -> bool
pub const fn is_ordered(self) -> bool
Whether this is false when either operand is a NaN.
FloatPred::False and FloatPred::True are neither ordered nor unordered, since
they do not look at their operands at all, and both answer no here.