HP-UX Floating-Point Guide

Chapter 3 81
Factors that Affect the Results of Floating-Point Computations
Other System-Related Factors that Affect Application Results
FMA instructions are generated by default at optimization levels of 2
and higher on PA2.0 systems. If you want your optimized code to
preserve exactly the expression semantics of your source code, specify
the +Ofltacc option to suppress the generation of FMA instructions.
Operating System Release of Build-Time
System
When the compiler performs binary-decimal conversions or constant
folding, it calls system math libraries to perform certain operations. For
example, the statement
X = LOG(10.1E2) + 1.2E0
causes the constant-folding phase of the compiler to invoke a system
logarithmic function.
New operating system releases from time to time include improved math
function libraries. The changes may be for improved performance,
accuracy, or both. In any case, if the libraries on the build-time system
change, the compiler’s constant folding may yield a different result, and
the application, regardless of which system it is run on, may also yield a
different result.
Operating System Release of Run-Time
System
As stated in “Operating System Release of Build-Time System”, different
operating system releases may have different libraries. If the libraries on
the run-time system change, an application run on that system may yield
different results from those yielded on previous releases.
If your application must produce the same results on every run-time
system, you should build your application using archive libraries instead
of shared libraries. Archive libraries cause the math routines of the
build-time system to be permanently bound to the application, making it
immune to future library changes on the run-time system. If you use
archive libraries, however, you cannot take advantage of improvements
in accuracy or performance in future library releases unless you rebuild
your application. For more information about archive libraries, see
“HP-UX Library Basics” on page 99 and “Shared Libraries versus
Archive Libraries” on page 181.