HP-UX Floating-Point Guide

76 Chapter 3
Factors that Affect the Results of Floating-Point Computations
Other System-Related Factors that Affect Application Results
Other System-Related Factors that
Affect Application Results
In the previous sections we discussed the three most fundamental causes
of inaccuracy in floating-point computations:
Rounding in basic operations
Math library functions
Exceptions and library errors
This section lists the factors that can contribute to inaccuracy or to
changes in the results of an application. We also show how each factor is
derived from the previously described three fundamental factors.
These factors are
Conversions between binary and decimal
Compiler behavior and compiler version
Compiler options
Hardware version of build-time system
Operating system release of build-time system
Operating system release of run-time system
Values of certain modifiable hardware status register fields
Conversions Between Binary and Decimal
A conversion from decimal to binary or from binary to decimal may take
place either at compile time or at run time. A compile-time
decimal-to-binary conversion takes place when a statement like the
following is compiled:
Y = 1.25E2
A run-time decimal-to-binary conversion takes place when the C library
routine atof is called, or when a statement like the following is
executed:
READ (*, ’(G5.2)’) X