Floating-point Options Quick Reference

The Intel® Compiler provides various options for you to optimize floating-point calculations with varying degrees of accuracy and predictability on different Intel architectures. This topic lists these compiler options and provides information about their supported architectures and operating systems.

IA-32, Intel® 64, and IA-64 architectures

Linux* and Mac OS* X

Windows*

Description

-fp-model

/fp

Specifies semantics used in floating-point calculations. Values are precise, fast [=1/2], strict, source, double, extended, [no-]except (Linux* and MacOS* X) and except[-] (Windows*).

-fp-speculation

/Qfp-speculation

Specifies the speculation mode for floating-point operations. Values are fast, safe, strict, and off.

-prec-div, -no-prec-div

/Qprec-div, /Qprec-div-

Attempts to use slower but more accurate implementation of 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.

Specifying -no-prec-div (Linux* and Mac OS* X) or /Qprec-div- (Windows*) enable the divide-to-reciprocal multiply optimization; these results are slightly less precise than full IEEE division results.

-complex-limited-range

/Qcomplex-limited-range

Enables the use of basic algebraic expansions of some arithmetic operations involving data of type COMPLEX. This can cause performance improvements in programs that use a lot of COMPLEX arithmetic. Values at the extremes of the exponent range might not compute correctly; for example, for single-precision floating-point operations, values >1.E20 or <1.E-20 will not compute correctly .

-ftz

/Qftz

May flush denormal results to zero. The default behavior depends on the architecture. Refer to the following topic for details:

  • -ftz compiler option

-fpe, -fpe-all

/fpe, /fpe-all

By default, the Fortran compiler disables all floating-point exceptions; whether floating underflow defaults to gradual or abrupt is architecture-dependent.

These options control which exceptions are enabled by the Fortran compiler. They also control whether floating-point underflow is gradual or abrupt.

IA-32 and Intel® 64 Architectures

Linux* and Mac OS* X

Windows*

Description

-prec-sqrt

/Qprec-sqrt

Improves the accuracy of square root implementations, but using this option may impact speed.

-pc

/Qpc

Changes the floating point significand precision in the x87 control word.

The application must use PROGRAM as the entry point, and you must compile the source file containing PROGRAM with this option.

  • -pc compiler option

-rcd

/Qrcd

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

  • -rcd compiler option

-fp-port

/Qfp-port

Causes floating-point values to be rounded to the source precision at assignments and casts.

-mp1

/Qprec

This option rounds floating-point values to the precision specified in the source program prior to comparisons. It also implies -prec-div and -prec-sqrt (Linux and Mac OS X) or /Qprec-div and /Qprec-sqrt (Windows).

  • -mp1 compiler option

IA-64 architecture only

Linux*

Windows*

Description

-fma, -no-fma

/Qfma, /Qfma-

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

-fp-relaxed

/Qfp-relaxed

Enables use of faster but slightly less accurate code sequences for math functions, such as the sqrt() function and the divide operation. As compared to strict IEEE* precision, using this option slightly reduces the accuracy of floating-point calculations performed by these functions, usually limited to the least significant binary digit.