pub enum Classify {
Unordered,
LessGreater,
Nan,
Infinite,
Finite,
SignBit,
}Expand description
Which question one of the floating point classification builtins asks.
The four that this does not have are isgreater, isgreaterequal, isless and
islessequal, which are >, >=, < and <= and are those.
Variants§
Unordered
isunordered(a, b), true when either of the two is a NaN and so the two cannot be put
in an order at all. C has no operator for this one.
LessGreater
islessgreater(a, b), which is a < b || a > b and so is false when either is a NaN.
That is not a != b, which is true of a NaN, so C has no operator for this one either.
Nan
isnan(x), the value that is not in an order with itself.
Infinite
isinf(x), either infinity.
Finite
isfinite(x), which is neither an infinity nor a NaN.
SignBit
signbit(x), which asks about the sign and not about the value, so it is true of a
negative zero and of a NaN whose sign bit is set.