HP C/iX Reference Manual (31506-90011)
Chapter 9 149
HP C/iX Implementation Topics
IEEE Floating-Point Format
IEEE Floating-Point Format
The internal representation of floating-point numbers conforms to the IEEE floating-point
standard, ANSI/IEEE 754-1985, as shown in Figure 9-1.
Figure 9-1. Internal Representation of Floating-Point Numbers
The s field contains the sign of the number. The exp field contains the biased exponent
(exp = E + bias, where E is the real exponent) of the number. The values of bias and the
maximum and minimum values of the unbiased exponent appear in the following table:
E
min
-1 is used to encode 0 and denormalized numbers.
E
max
+1 is used to encode infinities and NaNs.
NaNs are binary floating-point numbers that have all ones in the exponent and a nonzero
fraction. NaN is the term used for a binary floating-point number that has no value (that
is, "Not A Number").
If E is within the range
E
min
<=E<=E
max
the mantissa field contains the number in a normalized form, preceded by an implicit 1
and binary point.
In accordance with the IEEE standard, floating-point operations are performed with traps
Table 9-2. HP C/iX Data Types
float double long double
bias +127 +1023 +16383
E
max
+127 +1023 +16383
E
min
-126 -1022 -16382