P3109 comparisons and extrema #
Comparisons are unordered at NaN. The ten extrema differ in NaN handling, magnitude ordering, and preference for finite operands. Equal magnitudes use numerical order to resolve the sign: minimum selects the negative operand, maximum the positive operand.
Reference: P3109 unapproved interim report 4.0.3, revision 34f5964, §§4.11–4.12.
Strict extended-real comparison; NaN is unordered, including with itself.
Instances For
Numerical equality, ignoring NaN payloads by making every NaN comparison false.
Instances For
Non-strict extended-real comparison; NaN remains unordered.
Instances For
Reverse strict comparison.
Instances For
Reverse non-strict comparison.
Instances For
Minimum, propagating either NaN operand.
Instances For
Maximum, propagating either NaN operand.
Instances For
Ignore a single NaN before applying an extremum; two NaNs yield the canonical NaN.
Instances For
Minimum with a numerical operand preferred to NaN.
Instances For
Maximum with a numerical operand preferred to NaN.
Instances For
Minimum absolute value, resolving equal magnitudes toward the numerically smaller datum.
Instances For
Maximum absolute value, resolving equal magnitudes toward the numerically larger datum.
Instances For
Minimum magnitude with a numerical operand preferred to NaN.
Instances For
Maximum magnitude with a numerical operand preferred to NaN.
Instances For
Prefer the finite operand to an infinity, then use the supplied number extremum.
Instances For
Minimum finite variant: finite values outrank infinities, which outrank NaN.
Instances For
Maximum finite variant: finite values outrank infinities, which outrank NaN.
Instances For
Strict comparison of decoded operands, with NaN unordered.
Instances For
Non-strict comparison of decoded operands, with NaN unordered.
Instances For
Numerical equality; NaN compares unequal to every operand.
Instances For
Strict reverse comparison of decoded operands.
Instances For
Non-strict reverse comparison of decoded operands.
Instances For
Minimum with NaN propagation and the supplied final projection.
Instances For
Maximum with NaN propagation and the supplied final projection.
Instances For
Minimum with a numerical operand preferred to NaN.
Instances For
Maximum with a numerical operand preferred to NaN.
Instances For
Minimum magnitude, with negative sign preferred at a tie.
Instances For
Maximum magnitude, with positive sign preferred at a tie.
Instances For
Minimum magnitude with a numerical operand preferred to NaN.
Instances For
Maximum magnitude with a numerical operand preferred to NaN.
Instances For
Minimum preferring finite values to infinity and infinity to NaN.
Instances For
Maximum preferring finite values to infinity and infinity to NaN.