[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Sign of NaN
IEEE 754-2008
6.2 Operations with NaNs
4th paragraph: For an operation with quiet NaN inputs, other than
maximum and minimum operations, if a floating-point result is to be
delivered the result shall be a quiet NaN which should be one of the
input NaNs.
6.2.3 NaN propagation
1st paragraph: An operation which propagates a NaN operand to its
result and has a single NaN as an input should produce a NaN with the
payload of the input NaN if representable in the destination format.
6.3 The sign bit
1st paragraph: For all other operations, this standard does not
specify the sign bit of a NaN result, even when there is only one
input NaN, or when the NaN is produced from an invalid operation.
There is a problem when the "same" requirements are specified in two
or more places and they differ. I find the requirements in 6.2 (which
include the sign) to be at odds with 6.2.3 and 6.3 (which exclude the
sign). I believe that 6.2 needs to be altered. One suggestion is to
add at the end of the sentence: (as further specified in 6.2.3 and 6.3).
---
Fred J. Tydeman Tydeman Consulting
tydeman@xxxxxxxxx Testing, numerics, programming
+1 (775) 358-9748 Vice-chair of PL22.11 (ANSI "C")
Sample C99+FPCE tests: http://www.tybor.com
Savers sleep well, investors eat well, spenders work forever.