Floating-point Options for IA-32 and IntelŪ EM64T

The following table lists options that enable you to control the compiler optimizations for floating-point computations on IA-32 and IntelŪ EM64T systems. The options listed here are not valid for ItaniumŪ-based systems.

Windows*

Linux*

Effect

/Qprec-div

-prec-div

Attempts to use faster but less accurate implementation of single precision floating-point divide.  Use this option to disable the divide optimizations in cases where it is important to maintain the full range and precision for floating-point division. Using this option results in greater accuracy with some loss of performance.

When using -fp-model precise (Linux*) or /fp:precise (Windows*) the divide optimization is disabled.

Use -no-prec-div (Linux) or /Qprec-div- (Windows) to enable the divide optimizations. Additionally, -no-prec-div enables the division-to-multiplication by reciprocal optimization; -fast implies -no-prec-div.

For more information, see the following topic:

/Qpc

-pc

Changes the floating point precision control when the main() function is compiled. The program that uses this option must use main() as its entry point, and the file containing main() must be compiled using this option.

A change of the default precision control or rounding mode (for example, by using the -pc32 (Linux) or /Qpc32 (Windows) flag or by user intervention) may affect the results returned by some of the mathematical functions.

For more information, see the following topic:

  • -pc compiler option

/Qrcd

-rcd

Disables rounding mode changes for floating-point-to-integer conversions.

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.

This option disables the change to truncation of the rounding mode for all floating point calculations, including floating-point-to-integer conversions. This behavior means that all floating point calculations must use the default round-to-nearest, including floating point-to-integer conversions. Turning on this option can improve performance, but floating-point conversions to integer will not conform to Fortran semantics.

For more information, see the following topic:

  • -rcd compiler option

/Qrct

No equivalent

Sets internal FPU rounding control to truncate. Use for rounding control.

Use this option to compile the main() routine. The compiler will assume the rounding mode in the floating-point control word is truncate, so it will not change the rounding mode before integer conversions.

For detailed information on the FPU control word, refer to IA-32 IntelŪ Architecture Software Developer's Manual, Volume 1: Basic Architecture (http://www.intel.com/design/pentium4/manuals/index_new.htm).

/Qfp-port

-fp-port

Provides a rounding control of the results of the floating-point data operations. Using this option might cause some speed impact, but it also makes sure that rounding to the user-declared precision at assignments is always done.

  • Linux: -fp-port is supported on both IA-32 and Intel® EM64T systems.

  • Windows: /Qfp-port is supported on IA-32 only.

For more information, see the following topic:

/Qprec-sqrt

-prec-sqrt

Improves precision of square root implementations, but using the option might impact speed.

The compiler uses a fast but less accurate implementation of single precision floating-point square root. In cases where it is important to maintain full accuracy for square root calculations, use this option to disable the square root optimization.

When using -fp-model precise (Linux) or /fp:precise (Windows) the square root optimization is disabled. Use -no-prec-sqrt (Linux) or /Qprec-sqrt- (Windows) to enable the square root optimization.

For more information, see the following topic: