fltconsistency

Enables improved floating-point consistency.

IDE Equivalent

Windows: Floating-Point > Floating-Point Consistency  (/Op)

Architectures

IA-32, IntelŪ EM64T, IntelŪ ItaniumŪ architecture

Syntax

Linux: -fltconsistency
-nofltconsistency
Windows: /fltconsistency
/nofltconsistency

Arguments

None

Default

OFF Improved floating-point consistency is not enabled. This setting provides better accuracy and run-time performance at the expense of less consistent floating-point results.

Description

This option enables improved floating-point consistency and may slightly reduce execution speed. It limits floating-point optimizations and maintains declared precision. It also disables inlining of math library functions.

Floating-point operations are not reordered and the result of each floating-point operation is stored in the target variable rather than being kept in the floating-point processor for use in a subsequent calculation.

For example, the compiler can change floating-point division computations into multiplication by the reciprocal of the denominator. This change can alter the results of floating-point division computations slightly.

Floating-point intermediate results are kept in full 80 bits internal precision. Additionally, all spills/reloads of the X87 floating point registers are done using the internal formats; this prevents accidental loss of precision due to spill/reload behavior over which you have no control.

Specifying this option has the following effects on program compilation:

This option causes performance degradation relative to using default floating-point optimization flags.
On Windows systems, an alternative is to use the /Qprec option, which should provide better than default floating-point precision while still delivering good floating-point performance.

Alternate Options

fltconsistency Linux: -mp, -mieee-fp
Windows: /Op
nofltconsistency  Linux: -mno-ieee-fp
Windows: None

See Also

mp1, Qprec compiler option

Optimizing Applications:
Improving or Restricting FP Arithmetic Precision

Floating-point Options for Itanium(R)-based Applications