Intel® C++ Compiler 16.0 User and Reference Guide
Indicates the input arguments domain on which math functions must provide correct results.
Linux and OS X: | -fimf-domain-exclusion=classlist[:funclist] |
Windows: | /Qimf-domain-exclusion:classlist[:funclist] |
classlist |
Is one of the following:
|
||||||||||||||||||||||||||||||||||
funclist |
Is an optional list of one or more math library functions to which the attribute should be applied. 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-domain-exclusion=4:sin,sinf (or /Qimf-domain-exclusion:4:sin,sinf) to specify infinities 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-domain-exclusion=4 or /Qimf-domain-exclusion:4 -fimf-domain-exclusion=5:/,powf or /Qimf-domain-exclusion:5:/,powf -fimf-domain-exclusion=23:log,logf,/,sin,cosf or /Qimf-domain-exclusion:23:log,logf,/,sin,cosf If you don’t specify argument funclist, the domain restrictions apply to all math library functions. |
Zero ("0") |
The compiler uses default heuristics when calling math library functions. |
This option indicates the input arguments domain on which math functions must provide correct results. It specifies that your program will function correctly if the functions specified in funclist do not produce standard conforming results on the number classes.
This option can affect run-time performance and the accuracy of results. As more classes are excluded, faster code sequences can be used.
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-domain-exclusion=denormals:sin or /Qimf-domain-exclusion:denormals:sin, or -fimf-domain-exclusion=extremes:sqrtf or /Qimf domain-exclusion:extremes: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.
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.
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
Consider the following single-precision sequence for function exp2f:
Operation: | y = exp2f(x) |
Accuracy: | 1.014 ulp |
Instructions: | 4 (2 without fix-up) |
The following shows the 2-instruction sequence without the fix-up:
vcvtfxpntps2dq zmm1 {k1}, zmm0, 0x50 // zmm1 <-- rndToInt(2^24 * x) vexp223ps zmm1 {k1}, zmm1 // zmm1 <-- exp2(x)
However, the above 2-instruction sequence will not correctly process NaNs. To process Nans correctly, the following fix-up must be included following the above instruction sequence:
vpxord zmm2, zmm2, zmm2 // zmm2 <-- 0 vfixupnanps zmm1 {k1}, zmm0, zmm2 {aaaa} // zmm1 <-- QNaN(x) if x is NaN <F>
If the vfixupnanps instruction is not included, the sequence correctly processes any arguments except NaN values. For example, the following options generate the 2-instruction sequence:
-fimf-domain-exclusion=2:exp2f <- NaN’s are excluded (2 corresponds to NaNs) -fimf-domain-exclusion=6:exp2f <- NaN’s and infinities are excluded (4 corresponds to infinities; 2 + 4 = 6) -fimf-domain-exclusion=7:exp2f <- NaN’s, infinities, and extremes are excluded (1 corresponds to extremes; 2 + 4 + 1 = 7) -fimf-domain-exclusion=15:exp2f <- NaN’s, infinities, extremes, and denormals are excluded (8 corresponds to denormals; 2 + 4 + 1 + 8=15)
If the vfixupnanps instruction is included, the sequence correctly processes any arguments including NaN values. For example, the following options generate the 4-instruction sequence:
-fimf-domain-exclusion=1:exp2f <- only extremes are excluded (1 corresponds to extremes) -fimf-domain-exclusion=4:exp2f <- only infinities are excluded (4 corresponds to infinities) -fimf-domain-exclusion=8:exp2f <- only denormals are excluded (8 corresponds to denormals) -fimf-domain-exclusion=13:exp2f <- only extremes, infinities and denormals are excluded (1 + 4 + 8 = 13)