Floating-Point Options

The floating-point options let you specify how you want floating-point data to be treated.

See also Optimization Options.

Descriptions of Floating-Point Options

-assume [no]minus0

Default: -assume nominus0

Tells the compiler to use Fortran 95 standard semantics for the treatment of the IEEE* floating-point value -0.0 in the SIGN intrinsic, if the processor is capable of distinguishing the difference between -0.0 and +0.0, and to write a value of -0.0 with a negative sign on formatted output.

The default, -assume nominus0, tells the compiler to use Fortran 90/77 standard semantics in the SIGN intrinsic, to treat -0.0 and +0.0 as 0.0, and to write a value of -0.0 with no sign on formatted output.

-[no]fltconsistency

Default: -nofltconsistency

Alternate syntax: -mp

Enables improved floating-point consistency during calculations.

This option limits floating-point optimizations and maintains declared precision. Floating-point operations are not reordered and the result of each floating-point operation is stored into 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.

The default value, -nofltconsistency, provides better accuracy and run-time performance at the expense of less consistent floating-point results.

This option might slightly reduce execution speed.

See also "Improving/Restricting FP Arithmetic Precision" in Volume II: Optimizing Applications.

-fp_port (IA-32 systems only)

Default: Off

Rounds floating-point results after floating-point operations, so rounding to user-declared precision happens at assignments and type conversions; this has some impact on speed.

The default is to keep results of floating-point operations in higher precision; this provides better performance but less consistent floating-point results.

See also "Floating-Point Arithmetic Precision for IA-32 Systems" in Volume II: Optimizing Applications.

-[no]fpconstant

Default: -nofpconstant

Requests that a single-precision constant assigned to a double-precision variable be evaluated in double precision instead of single precision.

The Fortran standard requires that the constant be evaluated in single precision.
Certain programs created for FORTRAN-77 compilers may show different floating-point results, because they rely on single-precision constants assigned to a double-precision variable to be evaluated in double precision.

In the following example, if you specify /fpconstant, identical values are assigned to D1 and D2. If you omit /fpconstant, the compiler will obey the standard and assign a less precise value to D1:

REAL (KIND=8) D1, D2

DATA D1 /2.71828182846182/   ! REAL (KIND=4) value expanded to double

DATA D2 /2.71828182846182D0/ ! Double value assigned to double

-fpen

Default: -fpe3

Specifies floating-point exception handling at run time for the main program. This includes whether exceptional floating-point values are allowed and how precisely run-time exceptions are reported. This option controls how the following exceptions are handled:

You can choose the following:

On IA-32 systems, using -fpe0 will slow run-time performance.

Many programs do not need to handle denormalized numbers or other exceptional values. On Itanium®-based systems, using -fpe3 will slow run-time performance.

-fpstkchk (IA-32 systems only)

Default: Off

Generates extra code after every function call to ensure that the floating-point (FP)stack is in the expected state.

By default, there is no checking. So when the FP stack overflows, a NaN value is put into FP calculations, and the program's results differ. Unfortunately, the overflow point can be far away from the point of the actual bug. The -fpstkchk option places code that would access-violate immediately after an incorrect call occurred, thus making it easier to locate these issues.

-fr32 (Itanium®-based systems only)

Default: Off

Specifies that the use of high floating-point registers should be disabled.

-ftz[-]

Default: Off (-ftz-) on IA-32 systems; off (-ftz-) on Itanium-based systems, except for optimization level -O3, in which case the default is on (-ftz)

Enables flush denormal results to zero. This option has effect only when compiling the main program.

-IPF_flt_eval_method0 (Itanium®-based systems only)

Default: Off

Directs the compiler to evaluate the expressions involving floating-point operands in the precision indicated by the variable types declared in the program. By default, intermediate floating-point expressions are maintained in higher precision.

See also "Floating-Point Arithmetic Options for Itanium-Based Systems" in Volume II: Optimizing Applications.

-IPF_fltacc[-] (Itanium®-based systems only)

Default: Off

Enables  the compiler to apply optimizations that affect floating-point accuracy.

See also "Floating-Point Arithmetic Options for Itanium-Based Systems" in Volume II: Optimizing Applications.

See also Floating-Point Arithmetic Options for ItaniumŪ-based Systems.

-IPF_fma[-] (Itanium®-based systems only)

Default: Off

Enables the combining of floating-point multiply and add/subtract operations into a single operation.

-IPF_fp_speculationmode (Itanium®-based systems only)

Default: -IPF_fp_speculationfast

Enables floating-point operations in one of the following modes:

See also "Floating-Point Arithmetic Options for Itanium-Based Systems" in Volume II: Optimizing Applications.

-mp1 (IA-32 systems only)

Default: Off

Restricts floating-point precision to be closer to declared precision. This option has some impact on speed, but less than the impact of -mp.

-pc{32|64|80} (IA-32 systems only)

Default: -pc64

Enables floating-point significand precision control. Possible values are: