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.

Options for All Supported Intel® 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*) enables the divide-to-reciprocal multiply optimization; these results are slightly less precise than full IEEE division results. However, you may get different answers if you use these options on non-Intel processors.

-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.

The options -fp-model or /fp, -[no-]fast-transcendentals or /Qfast-transcendentals-, -fp-speculation or /Qfp-speculation, and the -fimf-<> set of options may influence the choice of math routines that are invoked. Many routines in the libirc, libm, and svml library are more highly optimized for Intel microprocessors than for non-Intel microprocessors.

Options for IA-32 and Intel® 64 Architectures

Linux* and Mac OS* X

Windows*

Description

-prec-sqrt, no-prec-sqrt

/Qprec-sqrt, /Qprec-sqrt-

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

The default is the no-prec-sqrt (Linux* and Mac OS* X) or the /Qprec-sqrt- (Windows*) option, using which the compiler does a faster but less precise implementation of square root calculation. You may get a different answer if you use the no-prec-sqrt (Linux* and Mac OS* X) or /Qprec-sqrt- (Windows*) option on non-Intel processors.

-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).

You may get a different answer if you use this option on non-Intel processors.

  • -mp1 compiler option

Submit feedback on this help topic

Copyright © 1996-2010, Intel Corporation. All rights reserved.