Numerical and exceptional-value rules for binary total order #
The order laws follow from the order on complete exact data. The numerical theorems connect the predicate to dyadic, real, and extended-real comparisons. The exceptional-value rules state the IEEE sign and signaling-class priorities and FloatLib's implementation-defined payload direction explicitly.
The model predicate is precisely the shared order on complete decoded data.
All binary words precede themselves, including signaling NaNs.
Totality is independent of field width, bias, and exceptional-value policy.
Binary total ordering is transitive for every descriptor.
Mutual ordering identifies the complete decoded data for every descriptor.
Complete decoded data determine their binary word, so total order is antisymmetric.
Mutual comparison holds exactly for bitwise-identical operands.
Successful finite decoding transports the complete signed numerical ordering rule.
The existing numerical comparator's strict order is respected, including infinities.
The existing numerical comparator's reversed strict order fails total ordering.
In a signed-zero format, negative zero precedes positive zero.
In a signed-zero format, positive zero does not precede negative zero.
A NaN precedes a number exactly when its sign bit is negative.
A number precedes a NaN exactly when that NaN has positive sign.
Complete sign, signaling-class, and payload rule for two binary NaNs.
Positive NaNs in the same NaN class are ordered by increasing fraction payload.
Negative NaNs in the same NaN class are ordered by decreasing fraction payload.