Math functions
Some C/C++ standard library math functions are available in different versions:
The default versions
Smaller versions (but less accurate)
More accurate versions (but larger).
Smaller versions
The functions cos, exp, log, log2, log10, pow, sin, and tan exist in additional, smaller versions in the library. They are about 20% smaller and about 20% faster than the default versions. The functions handle INF and NaN values. The drawbacks are that they almost always lose some precision and they do not have the same input range as the default versions.
The names of the functions are constructed like:
__iar_ xxx _small<f|l>
where f is used for float variants, l is used for long double variants, and no suffix is used for double variants.
To specify smaller math functions on the command line:Specify the command line option
‑‑small_mathto the linker.Link your application and the complete set will be used.
More accurate versions
The functions cos, pow, sin, and tan exist in versions in the library that are more exact and can handle larger argument ranges. The drawback is that they are larger and slower than the default versions.
The names of the functions are constructed like:
__iar_ xxx _accurate<f|l>
where f is used for float variants, l is used for long double variants, and no suffix is used for double variants.
To specify more accurate math functions on the command line:Specify the command line option
‑‑accurate_mathto the linker.Link your application and the complete set will be used.