Floating-point Arithmetic Precision

Option Description
-Op The -Op option restricts optimization to maintain declared precision and to ensure that floating-point arithmetic conforms more closely to the ANSI and IEEE standards.
-Qlong_double Use -Qlong_double to change the size of the long double type to 80 bits. For compatibility with the Microsoft* compiler, the Intel compiler's default long double type is 64 bits in size, the same as the double type. This option introduces a number of incompatibilities with other files compiled without this option and with calls to library routines. Therefore, Intel recommends that the use of long double variables be local to a single file when you compile with this option.

Options for IA-32 Only

The following options are only relevant to compilations targeted to the IA-32 architecture.
Caution
A change of the default precision control or rounding mode (for example, by using the -Qpc32 flag or by user intervention) may affect the results returned by some of the mathematical functions.
Option Description
-Qprec Use the -Qprec option to improve floating-point precision. -Qprec disables fewer optimizations and has less impact on performance than -Op.
-Qprec_div With some optimizations, such as -xK and -xW, the Intel® C++ Compiler changes floating-point division computations into multiplication by the reciprocal of the denominator. For example, A/B is computed as A x (1/B) to improve the speed of the computation. However, for values of B greater than 2126, the value of 1/B is "flushed" (changed) to 0. When it is important to maintain the value of 1/B, use -prec_div to disable the floating-point division-to-multiplication optimization. The result of -prec_div is greater accuracy with some loss of performance.
-Qpcn Use the -Qpcn option to enable floating-point significand precision control. Some floating-point algorithms are sensitive to the accuracy of the significand or fractional part of the floating-point value. For example, iterative operations like division and finding the square root can run faster if you lower the precision with the -Qpcn option. Set n to one of the following values to round the significand to the indicated number of bits:
  • -Qpc32: 24 bits (single precision) -- See Caution statement above.
  • -Qpc64: 53 bits (single precision)
  • -Qpc80: 64 bits (single precision)
The default value for n is 64, indicating double precision.
This option allows 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.
The -Qpcn option causes the compiler to change the floating point precision control when the main() function is compiled. The program that uses -Qpcn must use main() as its entry point, and the file containing main() must be compiled with -Qpcn.
-Qrcd The Intel compiler uses the -Qrcd option to improve the performance of code that requires floating-point-to-integer conversions. 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 C 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-to-integer conversion and change it back afterwards.
The -Qrcd option disables the change to truncation of the rounding mode for all floating point calculations, including floating point-to-integer conversions. Turning on this option can improve performance, but floating point conversions to integer will not conform to C semantics.