HP aC++/HP C A.06.25 Programmer's Guide
NOTE: This option is deprecated and may not be supported in the future releases.
+O[no]fltacc
+O[no]fltacc=level
The +O[no]fltacc option disables [enables] floating-point optimizations that can
result in numerical differences. Any option other than +Ofltacc=strict also
generates Fused Multiply-Add (FMA) instructions. FMA instructions can improve
performance of floating-point applications.
If you specify neither +Ofltacc nor +Onofltacc, less optimization is performed
than for +Onofltacc. If you specify neither option, the optimizer generates FMA
instructions but does not perform any expression-reordering optimizations.
Specifying +Ofltacc insures the same result as in unoptimized code (+O0).
Usage:
+Ofltacc=level
The defined values for level are:
default
Allows contractions, such as fused multiply- add (FMA), but disallows
any other floating-point optimization that can result in numerical
differences.
limited
Like default, but also allows floating-point optimizations which may affect
the generation and propagation of infinities, NaNs, and the sign of zero.
relaxed
In addition to the optimizations allowed by limited, permits optimizations,
such as reordering of expressions, even if parenthesized, that may affect
rounding error. This is the same as +Onofltacc.
strict
Disallows any floating-point optimization that can result in numerical
differences. This is the same as +Ofltacc.
All options except +Ofltacc=strict option allow the compiler to make
transformations which are algebraically correct, but which may slightly affect the result
of computations due to the inherent imperfection of computer floating-point arithmetic.
For many programs, the results obtained with these options are adequately similar to
those obtained without the optimization.
For applications in which round-off error has been carefully studied, and the order of
computation carefully crafted to control error, these options may be unsatisfactory. To
insure the same result as in unoptimized code, use +Ofltacc.
Example:
All the options, except +Ofltacc=strict, allow the compiler to replace a division
by a multiplication using the reciprocal. For example, the following code:
for (int j=1;j<5;j++)
a[j] = b[j] / x;
Code Optimizing Options 77