Floating-point Arithmetic Precision

The options described in this section-fp_port, -mp, -mp1, -pc32, -pc64, -pc80,  -prec_div
-rcd
provide optimizations with varying degrees of precision in floating-point arithmetic.The option that restricts these optimizations is -O0.

-mp Option

Use -mp to maintain floating-point precision since it limits floating-point optimizations. The Intel® Fortran 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. See Maintaining Floating-point Arithmetic Precision, -mp for more detail.

-mp1 Option

Use the -mp1 option to improve floating-point precision with less impact to performance than with the
-mp
option. The option will ensure the out-of-range check of operands of transcendental functions and improve accuracy of floating-point compares.

-prec_div Option (IA-32 Only)

Use -prec_div to improve the floating point division-to-multiplication optimization. The Intel® Fortran 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, but is faster.

-pc{32|64|80} Option (IA-32 Only)

Use the -pc{32|64|80} option to enable floating-point significand precision control. Some floating-point algorithms, created for specific 32- and Itanium-based systems, are sensitive to the accuracy of the significand or fractional part of the floating-point value. Use appropriate version of the option to round the significand to the number of bits as follows:

-pc32: 24 bits (single precision)

-pc64: 53 bits (double precision)

-pc80: 64 bits (extended precision)

The default version is -pc64 for full floating-point precision.

This option enables full optimization. Using this option does not have the negative performance impact of using the -Op option because only the fractional part of the floating-point value is affected. The range of the exponent is not affected.

Rounding Control, -rcd, -fp_port (IA-32 Only)

The Intel Fortran Compiler uses the -rcd option to improve the performance of code that performs floating point-to-integer conversion. The optimization is obtained by controlling the change of the rounding mode.

The system default floating-point rounding mode is round-to-nearest. This means that values are rounded during floating- point calculations. However, the Fortran language requires floating-point values to be truncated when a conversion to an integer is involved. To do this, the compiler must change the rounding mode to truncation before each floating-point conversion and change it back afterwards.

The -rcd option disables the change to truncation of the rounding mode in floating-point-to-integer conversions. This means that all floating-point calculations must use the default round-to-nearest, including floating-point-to-integer conversions. This option has no effect on floating-point calculations, but conversions to integer will not conform to Fortran semantics.

You can also use the -fp_port option to round floating-point results at assignments and casts. This option has some speed impact.