HP Fortran Programmer's Guide (September 2007)

Compiling and linking
Compiling with the f90 command
Chapter 2 65
+O[no]fltacc
+Onofltacc enables optimizations that follow the rules of algebra but may
change the order of expression evaluation. For example, if a, b, and c are
floating-point variables, the expressions (a+b)+cand a+(b+c)may
give slightly different results due to roundoff.
The +Onofltacc option also enables the fusion of adjacent multiply and add
operations—resulting in Fused Multiply-Add (FMA). FMA is implemented
by the FMPYFADD and FMPYNFADD instructions and is only available on
PA-RISC 2.0 systems. (At optimization level 2 or higher, FMA occurs by
default.) FMA improves performance but occasionally produces results that
may differ in accuracy from results produced by code where fusion has not
occurred. In general, the differences are slight.
+Ofltacc disables optimizations that change the order of expression
evaluation and therefore may affect the accuracy of the result. The
+Ofltacc option also disables fusing.
Table 2-9 identifies the different actions taken by the optimizer, according to
whether you specify +Ofltacc, +Onofltacc, or neither option. In all cases,
the table assumes that you are compiling at optimization level 2 (+O2) or
higher.
+O[no]fltacc=[strict|default|limited|relaxed]
Control the level of floating point optimizations that the compiler may
perform. The defined values for optlevel are:
strict—disallow any floating point optimization that can result in
numerical differences. This is the same as +Ofltacc.
default—allow contractions, such as fused multiply-add (FMA), but
disallows any other floating point optimization that can result in numerical
differences.
Table 2-9 Optimizations performed by +O[no]fltacc
+O[no]fltacc
Expression
reordering?
FMA?
No Yes
+Ofltacc No No
+Onofltacc Yes Yes