HP-UX Floating-Point Guide

46 Chapter 2
Floating-Point Principles and the IEEE Standard for Binary Floating-Point Arithmetic
Floating-Point Formats
Table 2-4 Properties of NaNs
Zero
The IEEE standard defines both a positive zero and a negative zero. In
both cases, the value is represented by setting all bits in the exponent
and fraction to zero. The only difference, therefore, is that the sign bit is
set for a negative zero. Table 2-5 shows some of the properties of
floating-point zeros.
Operand Operator Operand Result
SNaN
QNaN
SNaN1
QNaN1
+
+
+
+
Finite Value
Finite Value
SNaN2
QNaN2
QNaN (invalid operation)
QNaN
QNaN (invalid operation)
QNaN1 or QNaN2
(implementation-
dependent)
SNaN
QNaN
float_to_int()
float_to_int()
Largest-magnitude
integer (invalid
operation)
Largest-magnitude
integer (invalid
operation)
SNaN
QNaN
sqrt()
sqrt()
QNaN (invalid operation)
QNaN