Intel® Fortran Compiler 16.0 User and Reference Guide

fltconsistency

Enables improved floating-point consistency.

Architecture Restrictions

Not available on Intel® 64 architecture targeting the Intel® Xeon Phi™ coprocessor x100 product family (formerly code name Knights Corner)

Syntax

Linux and OS X:

-fltconsistency

-nofltconsistency

Windows:

/fltconsistency

/nofltconsistency

Arguments

None

Default

nofltconsistency

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.

The recommended method to control the semantics of floating-point calculations is to use option -fp-model (Linux* and OS X*) or /fp (Windows*).

IDE Equivalent

Visual Studio: None

Eclipse: None

Xcode: Floating Point > Improve Floating-Point Consistency

Alternate Options

fltconsistency

Linux and OS X: -mieee-fp

Windows: None

nofltconsistency

Linux and OS X: -mno-ieee-fp

Windows: None

See Also