HP Compilers for HP Integrity Servers (September 2011)

In addition, the HP C compiler provides a choice of three decimal floating-point evaluation
methods, indicated by the -fpevaldec={_Decimal32|_Decimal64|
_Decimal128} option, analogous to their binary floating-point counterparts.
_Decimal32, the default, evaluates decimal floating operations and constants to
their semantic type.
_Decimal64 evaluates _Decimal32 operations and constants to the wider range
and precision of _Decimal64, and other operations and constants to their semantic
type.
_Decimal128 selects a method that evaluates _Decimal32 and _Decimal64
operations and constants to the wider range and precision of _Decimal128, and
other operations and constants to their semantic types.
Several HP compiler options allow the developer to control the accuracy of floating-point
computation and the treatment of special values.
+Ofltacc={strict|default|limited|relaxed} controls the accuracy of
floating-point computations.
strict disallows contractions, such as Floating Multiply-Add (FMA) synthesis.
This can also be expressed using #pragma STDC FP_CONTRACT OFF in the
source code at the desired scope.
default, the compiler’s default, allows contractions (FMA synthesis) as with
the C99 #pragma STDC FP_CONTRACT ON, but disallows any other
floating-point optimization that might change result values. Contractions are
acceptable in most applications, but can break those that depend on operations
being rounded to specific range and precision and (rarely) some that do not.
limited is like default except that it also allows floating-point optimizations
(such as substitution of 0.0 for x * 0.0) that might impact the generation and
propagation of infinities, Not A Numbers (NaNs), and the sign of zero.
relaxed indicates the characteristics of limited and allows floating-point
optimization (such as reordering of expressions, even if parenthesized) that might
change rounding errors. The option relaxed allows the compiler to invoke
slightly less accurate math functions to improve performance. The relaxed option
now implies +Ocxlimitedrange; an explicit +Onocxlimitedrange option
overrides the implication.
The +Osumreduction option allows the optimization of sum reductions, regardless
of the floating-point accuracy. Normally, sum reductions are only optimized under
+Ofltacc=relaxed for the C/C++ compilers (the Fortran language standard
allows them to be optimized by default). This option can be used to allow sum
reduction optimization under any setting of the +Ofltacc option. It is useful for
programs that do not require program ordering of the partial sums involved in the
sum reduction, but that require accuracy in other computations. Alternatively, the
22 HP compilers for HP Integrity servers