C/C++ Programmer's Guide (G06.27+, H06.03+)

Table Of Contents
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
13-46
IEEE_FLOAT
°
IEEE floating-point denormalized numbers avoid computational problems that
arise from very small numbers as intermediate results in computations.
Table 13-4 lists the macros in the float.h file that have different values for the
two floating-point formats.
In addition to the differences shown in Table 13-4, note these:
°
For the float type in IEEE floating-point format, the smallest positive nonzero
number is approximately 1.40129846E-45. This is a denormalized number;
Tandem floating-point format does not have denormalized numbers.
°
For the double type in IEEE floating-point format, the smallest positive
nonzero number is approximately 4.9406564584124654E-324. This is a
denormalized number.
°
IEEE floating-point format has special values for Infinity and Not a Number
(NaN). In addition, for every value except NaN values, there is a positive value
and a negative value. This includes infinities (+Infinity and -Infinity) and zeroes
(+0 and -0).
Table 13-4. IEEE and Tandem Floating-Point Macro Values in float.h
Macro Name Tandem Format IEEE Format
FLT_ROUNDS 1 1
FLT_RADIX 2 2
FLT_MANT_DIG 23 24
DBL_MANT_DIG 55 53
FLT_EPSILON 2.3841858e-07 1.9209290e-07
DBL_EPSILON 5.551115123125782720e-17 2.2204460492503131e-16
FLT_MIN_10_EXP (-77) (-37)
DBL_MIN_10_EXP (-77) (-307)
FLT_MAX_10_EXP 77 38
DBL_MAX_10_EXP 77 308
FLT_MIN_EXP (-254) (-125)
DBL_MIN_EXP (-254) (-1021)
FLT_MAX_EXP 254 128
DBL_MAX_EXP 254 1024
FLT_DIG 6 6
DBL_DIG 16 15
FLT_MIN 1.7272337e-77 1.17549435E-38F
DBL_MIN 1.7272337110188889e-77 2.2250738585072014E-308
FLT_MAX 1.1579208e77 3.40282347E+38F
DBL_MAX 1.15792089237316192e77 1.7976931348623157E+308