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-45
IEEE_FLOAT
The pragma default settings are:
Usage Guidelines
The IEEE_FLOAT directive can be entered on the compiler RUN command line or,
in the OSS environment, with the -W IEEE_float flag of the c89 program.
To build and run programs using IEEE floating-point format, you need these
software and hardware:
°
NonStop server with an Itanium processor or NonStop S7000 or S72000 server
(IEEE floating-point format is not available on NonStop S70000 processors)
°
NonStop OS G07 or later product version
°
G06.06 or later product version of the native C or C++ compiler
°
G06.06 or later product version of the eld, ld, or nld utility for linking
You must also specify the VERSION2 directive if you specify IEEE_FLOAT with the
TNS/R native C++ compiler. For more details, see VERSION2 on page 13-108.
If you specify the IEEE_FLOAT directive, you cannot also specify the SQL pragma.
Note these advantages of using IEEE floating-point:
°
IEEE floating-point format has a different range of values and different
precision than Tandem floating-point format.
°
IEEE floating-point format gives faster performance and is easier for porting
native applications than Tandem floating-point format.
°
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.
SYSTYPE GUARDIAN SYSTYPE OSS
TNS C compiler N.A. N.A.
G-series TNS c89 utility N.A. N.A.
TNS/R native C and C++ compilers TANDEM_FLOAT TANDEM_FLOAT
Native c89 utility TNS/R code:
TANDEM_FLOAT
TNS/E code:
IEEE_FLOAT
TNS/R code:
TANDEM_FLOAT
TNS/E code:
IEEE_FLOAT
TNS/E native C and C++ compilers IEEE_FLOAT IEEE_FLOAT