Intel® Fortran Compiler 19.0 Developer Guide and Reference
Lets you specify a level of accuracy (precision) that the compiler should use when determining which math library functions to use.
Linux and macOS: | -fimf-precision[=value[:funclist]] |
Windows: | /Qimf-precision[:value[:funclist]] |
value |
Is one of the following values denoting the desired accuracy:
In the above explanations, max-error means option -fimf-max-error (Linux* and macOS*) or /Qimf-max-error (Windows*); accuracy-bits means option -fimf-accuracy-bits (Linux* and macOS*) or /Qimf-accuracy-bits (Windows*). |
||||||||
funclist |
Is an optional list of one or more math library functions to which the attribute should be applied. Do not specify the standard Fortran name of the math function; you must specify the actual math library name. If you specify more than one function, they must be separated with commas. Precision-specific variants like sin and sinf are considered different functions, so you would need to use -fimf-precision=high:sin,sinf (or /Qimf-precision:high:sin,sinf) to specify high precision for both the single-precision and double-precision sine functions. You also can specify the symbol /f to denote single-precision divides, symbol / to denote double-precision divides, symbol /l to denote extended-precision divides, and symbol /q to denote quad-precision divides. For example you can specify -fimf-precision=low:/ or /Qimf-precision:low:/ and -fimf-precision=low:/f or /Qimf-precision:low:/f. |
medium |
The compiler uses medium precision when calling math library functions. Note that other options can affect precision; see below for details. |
This option lets you specify a level of accuracy (precision) that the compiler should use when determining which math library functions to use.
This option can be used to improve run-time performance if reduced accuracy is sufficient for the application, or it can be used to increase the accuracy of math library functions selected by the compiler.
In general, using a lower precision can improve run-time performance and using a higher precision may reduce run-time performance.
The reference option setting enables calls to math functions that were designed and implemented according to the ISO 26262 Standard. This option provides consistent results, and correct signaling of exceptional conditions through the errno variable and floating-point status flags for both scalar and vectorized code.
If you need to define the accuracy for a math function of a certain precision, specify the function name of the precision that you need. For example, if you want double precision, you can specify :sin; if you want single precision, you can specify :sinf, as in -fimf-precision=low:sin or /Qimf-precision:low:sin, or -fimf-precision=high:sqrtf or /Qimf-precision:high:sqrtf.
If you do not specify any function names, then the setting applies to all functions (and to all precisions). However, as soon as you specify an individual function name, the setting applies only to the function of corresponding precision. So, for example, sinf applies only to the single-precision sine function, sin applies only to the double-precision sine function, sinl applies only to the extended-precision sine function, etc.
There are three options you can use to express the maximum relative error. They are as follows:
-fimf-precision (Linux* and macOS*) or /Qimf-precision (Windows*)
-fimf-max-error (Linux* and macOS*) or /Qimf-max-error (Windows*)
-fimf-accuracy-bits (Linux and macOS*) or /Qimf-accuracy-bits (Windows)
If more than one of these options are specified, the default value for the maximum relative error is determined by the last one specified on the command line.
If none of the above options are specified, the default values for the maximum relative error are determined by the setting of the following options:
[Q]fast-transcendentals
[Q]prec-div
[Q]prec-sqrt
-fp-model (Linux and macOS*) or /fp (Windows)
Many routines in libraries LIBM (Math Library) and SVML (Short Vector Math Library) are more highly optimized for Intel® microprocessors than for non-Intel microprocessors.
The standard Fortran names for the various math intrinsic functions do not match the math library names of the math intrinsic functions. You must find the actual math library name that is generated for the relevant Fortran math intrinsic.
One way to do this is to generate assembly code by using options /Fa or /S on Windows, or option -S on Linux. The assembly code will show the actual math library name.
For example, if you create a program that contains a call to SIN(x) where x is declared as REAL(KIND=4) and then use option /S on Windows to produce assembly code for the program, the assembly code will show a call to sinf.
Therefore, to specify a level of accuracy for the single-precision sine function, you would specify -fimf-precision=sinf (or /Qimf-precision:sinf).
Optimization Notice |
---|
Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice. Notice revision #20110804 |
None