The floating-point options let you specify how you want floating-point data to be treated.
See also Optimization Options.
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.
Default: -nofltconsistency
Alternate syntax: -mp
Enables improved floating-point consistency during calculations.
-fltconsistency disables inlining of math library functions.
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.
When the -fltconsistency option is in use, floating point intermediate results are kept in full 10 byte 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.
This option causes performance degradation relative to using default floating point optimization flags. An alternative is to use the -mp1 option, which should provide better than default floating point precision while still delivering good floating point performance.
The default value, -nofltconsistency, provides good 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.
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.
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
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:
When floating-point calculations result in a divide by zero, overflow, or invalid operation.
When floating-point calculations result in an underflow.
When a denormalized number or other exceptional number (positive infinity, negative infinity, or a NaN) is present in an arithmetic expression.
You can choose the following:
-fpe0 specifies: underflow gives 0.0; abort on other IEEE exceptions
-fpe3 specifies: produce NaN, signed infinities, and denormal results
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.
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 fail immediately after an incorrect call occurred, thus making it easier to locate these issues.
Default: Off
Specifies that the use of high floating-point registers should be disabled.
Default: Off (-ftz-)
Enables flush denormal results to zero. This option has effect only when compiling the main program.
On Itanium-based systems, optimization level -O3 automatically sets the -ftz option.
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.
Default: Off
Disables optimizations that affect floating-point accuracy.
If the default setting is used (-IPF_fltacc-), the compiler might apply optimizations that reduce floating-point accuracy.
You can use -IPF_fltacc or -fltconsistency to improve floating-point accuracy, but at the cost of disabling some optimizations.
See also "Floating-Point Arithmetic Options for Itanium-Based Systems" in Volume II: Optimizing Applications.
Default: Off
Enables the combining of floating-point multiply and add/subtract operations into a single operation.
Default: -IPF_fp_relaxed-
Enables use of faster, but slightly less accurate code sequences for math functions such as divide and sqrt. Compared to strict IEEE* precision, this option slightly reduces the accuracy of floating-point calculations performed by these functions (usually limited to the least significant digit).
Default: -IPF_fp_speculationfast
Enables floating-point operations in one of the following modes:
fast Speculate on floating-point operations
safe Speculate on floating-point operations only when it is safe
strict Disables speculation on floating-point operations.
off Same as strict.
See also "Floating-Point Arithmetic Options for Itanium-Based Systems" in Volume II: Optimizing Applications.
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.
Default: -pc64
Enables floating-point significand precision control. Possible values are:
-pc32 Sets internal FPU precision to 24-bit significand
-pc64 Sets internal FPU precision to 53-bit significand
-pc80 Sets internal FPU precision to 64-bit significand