Most of the routines in libm.a for IA-32 have
been optimized for special use with the Intel
To use your own version of the standard math functions without unresolved
external errors, you must disable the automatic inline expansion by compiling
your program with the
-nolib_inline option, as described in Inline Expansion of Library Functions.
A change of the default precision control
or rounding mode (for example, by using the
-pc32 flag or by user intervention) may affect the results returned
by some of the mathematical functions.
The optimized math libraries contain a package of functions, called primitives. The Intel Fortran Compiler calls these functions to implement numerous floating-point intrinsics and exponentiation. About half of the functions in the library from Intel are written in assembly language and optimized for program execution speed on an IA-32 architecture processor.
Note
The library primitives are not Fortran intrinsics. They are standard library
calls used by the compiler to implement Intel Fortran language features.
Following is a list of math library primitives that have been optimized.
acos |
cos |
log10 |
sinh |
asin |
cosh |
pow |
sqrt |
atan |
exp |
powf |
tan |
atan2 |
log |
sin |
tanh |
The math library also provides the following non-optimized primitives.
acosh |
copysign |
fmod |
gamma |
asinh |
erf |
fmodf |
remainder |
atanh |
fabs |
hypot |
rint |
cbrt |
fabsf |
j0 |
y0 |
ceil |
floor |
j1 |
y1 |
ceilf |
floorf |
jn |
y2 |
Primitives adhere to standard calling conventions, thus you can call them with other high-level languages as well as with assembly language. For Intel Fortran Compiler programs, specify the appropriate Fortran intrinsic name for arguments of type REAL and DOUBLE PRECISION. The compiler calls the appropriate single- or double-precision primitive based on the type of the argument you specify.
To use these functions, you have to write an INTERFACE block that specifies the ALIAS name of the function. The routine names in the math library are lower case.