Option | Description |
---|---|
-mp | The -mp option restricts optimization to maintain
declared precision and to ensure that floating-point arithmetic conforms
more closely to the ANSI and IEEE standards. For most programs, specifying
this option adversely affects performance. If you are not sure whether
your application needs this option, try compiling and running your program
both with and without it to evaluate the effects on performance versus
precision. Specifying this option has the following effects on program
compilation:
Note: The -nolib_inline and -mp options are active by default when you choose the -Xc (strict ANSI C conformance) option. |
-long_double | Use -long_double to change the size of the long double type to 80 bits. The Intel compiler's defalt 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. |
Caution
A change of the default precision control or rounding mode (for example, by using the -pc32 flag or by user intervention) may affect the results returned by some of the mathematical functions.
Option | Description |
---|---|
-mp1 | Use the -mp1 option to improve floating-point precision. -mp1 disables fewer optimizations and has less impact on performance than -mp. |
-prec_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. |
-pcn |
Use the -pcn 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 -pcn option. Set n to one of the following values to round the significand to the indicated number of bits:
The default value for n is 64, indicating double precision. |
-rcd | The Intel compiler uses the -rcd 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 -rcd 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. |