C/C++ Programmer's Guide (G06.25+)

Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems429301-008
13-46
IEEE_FLOAT
°
IEEE floating-point default handling of overflow, underflow, divide-by-zero, and
invalid operation is better than the Tandem floating-point handling.
°
IEEE floating-point default rounding mode gives more accurate results.
°
IEEE floating-point directed roundings and “sticky” flags are useful debugging
tools for investigating calculations that might go wrong because of rounding
problems, division by zero, or other problems. Sticky flags are exception flags
that stay set until explicitly reset by the user. Sticky flags allow the user to
check a chain of computations.
°
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.
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