[Cfp-interest 2970] islessgreater()
Damian McGuckin
damianm at esi.com.au
Thu Jan 4 20:29:32 PST 2024
This can be described as:
The islessgreater macro determines whether its first argument is
less than or greater than its second argument. The
islessgreater(x,y) macro is similar to (x) < (y) || (x) > (y) .
However, islessgreater(x,y) does not raise the "invalid"
floating-point exception when x and y are unordered and neither is
a signaling NaN (nor does it evaluate x and y twice).
What is the history here please?
While IEEE 754 had this operation as '<>' but it was signalling. There was
no quiet version.
In 2002, Kahan referenced the same operation but again, it was signalling.
He did have a quiet version defined with the operator as '!=?'. Is this
its origin? It was in an Appendix in his March 23, 2002 paper:
Fclass: a Proposed Classification of Standard Floating-Point Operands
It had disappeared from IEEE 754 by IEEE 2008 and has not reappeared in
IEEE 754 since.
Thanks - Damian
More information about the Cfp-interest
mailing list