Developer Guide and Reference

Contents

Overview: Intel® Math Library

The Intel® C++ Compiler includes a mathematical software library containing highly optimized and very accurate mathematical functions. These functions are commonly used in scientific or graphic applications, as well as other programs that rely heavily on floating-point computations. To include support for C99
_Complex
data types, use the
[Q]
std=c99
compiler option.
Many routines in the Intel® Math Library are more optimized for Intel® microprocessors than for non-Intel microprocessors.
The
mathimf.h
header file includes prototypes for Intel® Math Library functions.
Intel's
math.h
header file is compatible with the gcc math library
libm
, but it does not cause the gcc* math library to be linked. The source can be built with either
gcc
,
icc
, or
icl
. When built with
icc
or
icl
, the Intel® Math Library will be linked. The header file for the Intel® Math Library
mathimf.h
contains additional functions that are found only in the Intel® Math Library. The source can only be built using the Intel® C++ Compilers and libraries.
The long double functions, such as
expl
or
logl
, in the Intel® Math Library are ABI incompatible with the Microsoft* libraries. This is because Intel’s compiler and libraries support the 80-bit long double data type (see the description of the Qlong-double option). For maximum compatibility we recommend use of Intel's
math.h
or
mathimf.h
header files along with the Intel Math Library.

Intel® Math Libraries for Linux*
and
macOS*

The math library linked to an application depends on the compilation or linkage options specified.
Library
Description
libimf.a
Default static math library.