LIBM is the standard C library of basic mathematical functions, such as sin(x), cos(x), exp(x), etc. To include the LIBM functions, just add -lm on your link command line.

The Intel compiler includes an optimized math library that contains optimized implementations of LIBM functions. Some users have reported up to a 10% performance improvement by using Intel's math library. If you use the Intel compiler, this library is included implicitly. If you use a non-Intel compiler, you need to explicitly link in the library. Note that libimf does not implement all libm functions, so you may need to link in libm as well.

Here is an example link line:

gcc test.o -L/usr/tce/packages/intel/default/lib -Wl,-rpath=/usr/tce/packages/intel/default/lib -limf -lm