Developer Guide and Reference

Contents

fimf-domain-exclusion, Qimf-domain-exclusion

Indicates the input arguments domain on which math functions must provide correct results.

Syntax

Linux:
-fimf-domain-exclusion
=
classlist
[
:
funclist
]
macOS:
-fimf-domain-exclusion
=
classlist
[
:
funclist
]
Windows:
/Qimf-domain-exclusion
:
classlist
[
:
funclist
]
Arguments
classlist
Is one of the following:
  • One or more of the following floating-point value classes you can exclude from the function domain without affecting the correctness of your program. The supported class names are:
    extremes
    This class is for values which do not lie within the usual domain of arguments for a given function.
    nans
    This means "x=Nan".
    infinities
    This means "x=infinities".
    denormals
    This means "x=denormal".
    zeros
    This means "x=0".
    Each
    classlist
    element corresponds to a power of two. The exclusion attribute is the logical or of the associated powers of two (that is, a bitmask).
    The following shows the current mapping from
    classlist
    mnemonics to numerical values:
    extremes
    1
    nans
    2
    infinities
    4
    denormals
    8
    zeros
    16
    none
    0
    all
    31
    common
    15
    other combinations
    bitwise OR of the used values
    You must specify the integer value that corresponds to the class that you want to exclude.
    Note that on excluded values, unexpected results may occur.
  • One of the following short-hand tokens:
    none
    This means that none of the supported classes are excluded from the domain. To indicate this token, specify 0, as in
    -fimf-domain-exclusion=0
    (or
    /Qimf-domain-exclusion:0
    ).
    all
    This means that all of the supported classes are excluded from the domain. To indicate this token, specify 31, as in
    -fimf-domain-exclusion=31
    (or
    /Qimf-domain-exclusion:31
    ).
    common
    This is the same as specifying extremes,nans,infinities,
    denormals
    . To indicate this token, specify 15 (1 + 2+ 4 + 8), as in
    -fimf-domain-exclusion=15
    (or
    /Qimf-domain-exclusion:15
    )
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.
Default
Zero ("0")
The compiler uses default heuristics when calling math library functions.
Description
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.