lhs < rhs, positive if lhs > rhs, 0 if the values are equal)Hook for `<`, `<=`, `>`, and `>=` that ensures comparison against integral values has the behavior expected by the usual arithmetic rules. The built-in semantics yield surprising behavior when comparing signed values against unsigned values, for example 0u < -1. The call hookOpCmp(x, y) returns -1 if and only if x is smaller than y in abstract arithmetic sense.
If one of the numbers is an integral and the other is a floating-point number, hookOpEquals(x, y) returns a floating-point number that is -1 if x < y, 0 if x == y, 1 if x > y, and NaN if the floating-point number is NaN.
lhs | The left-hand side of the comparison for ordering |
rhs | The right-hand side of the comparison for ordering |
lhs < rhs, positive if lhs > rhs, 0 if the values are equal)