Math Libraries

libimf.a is the math library provided by Intel and libm.a is the math library provided with gcc*.

Both of these libraries are linked in by default on IA-32 and Itanium® -based compilers. Both libraries are linked in because there are math functions supported by the GNU math library that are not in the Intel math library. This linking arrangement allows the GNU users to have all functions available when using ifort, with Intel optimized versions available when supported.

libimf.a is linked in before libm.a. If you link in libm.a first, it will change the versions of the math functions that are used.

It is recommended that you place libimf.a in the first directory specified in the LD_LIBRARY_PATH variable. The libimf.a and libm.a libraries are always linked with Fortran programs.

For example, if you place a library in directory /perform/, set the LD_LIBRARY_PATH variable to specify a list of directories, containing all other libraries, separated by semicolons.

libimf.a on the IA-32 Compiler

For the IA-32 compiler, libimf.a contains both generic math routines and versions of the math routines optimized for special use with the Intel Pentium® 4 and Intel® Xeon™ processors.

libimf.a on the Itanium-Based Compiler

For the Itanium-based compiler, libimf.a is optimized for use with the Itanium architecture. The compiler provides inlined versions of math library primitives and schedules the generated code with surrounding instructions. This can improve the performance of typical floating-point applications.