AMD Logo AMD Developer Central

AMD LibM
Skip Navigation LinksHome > CPU Tools > AMD Performance Libraries > AMD LibM

Overview

AMD LibM is a software library containing a collection of basic math functions optimized for x86-64 processor based machines. It provides many routines from the list of standard C99 math functions.

AMD LibM is a C library, which users can link in to their applications to replace compiler-provided math functions. Generally, programmers access basic math functions through their compiler. But those who want better accuracy or performance than their compiler’s math functions can use this library to help improve their applications.

AMD LibM 2.0 is the most current version of the library.

Functions

There are 102 C99 functions in this library. Here is a simple table that lists the function categories and the number of functions in each of them.

Trigonometric - 14

Remainder - 4

Hyperbolic - 12

Manipulation - 8

Exp & Log - 28

Max & Min & Diff - 6

Power & Absolute - 10

Nearest integer - 20

There are also 6 non-C99 functions. These functions are closely related to some of the C99 functions and are provided for convenience.

Refer to AMD LibM Functions for a full list of functions.

Accuracy & Performance

The accuracy of a math function is estimated in terms of maximum error (measured in ULP (unit in the last place)) between the obtained answer and the ideal infinite-precision answer, over that function’s range. The accuracy of AMD LibM functions in certain categories (absolute, nearest integer, remainder, manipulation, maximum, minimum, difference) is either 0 or 0.5 ULP. In these cases, the functions either produce exact answers or wherever applicable within the practical limits of correct rounding. In the remaining categories (trigonometric, hyperbolic, exponential, logarithmic, and power), the estimated accuracy is better than 1.0 ULP.

Although the primary objective of this first release of AMD LibM is coverage and functionality, many of the functions are very well optimized for performance. They make use of SSE instructions to reduce execution time. Significant effort was put in optimizing the performance of exponential and logarithmic category of functions. Many functions in the power, trigonometric and remainder categories also have good optimizations. Applications that use math functions significantly can benefit from this library.

System Requirements

  • x86-64 processor based machine
  • Linux 64 or Windows 64
  • GCC 4.1.1 or later for Linux libraries
  • Microsoft Visual Studio 2005 or later for Windows libraries

Related resources

Note: The ‘acml_mv’ component of the ACML library has provided, and continues to provide, an important subset of scalar math functions. AMD LibM is an effort to provide those functions in a stand-alone library and also significantly expand on the number of functions. The ‘acml_mv’ component will continue to be a part of ACML.

Downloads

*Please note: Read Software License Agreement before downloading.

Reset My View

File NameLaunch DateOSBitnessDescription
amdlibm-lin64.tgz (198 KB)10/09/2009Linux®64-bitAMD LibM 2.0 for Linux®
amdlibm-win64.zip (239 KB)10/09/2009Windows® 64-bitAMD LibM 2.0 for Windows®
Quick Poll
LibM 2.0 is available in 64-bit, only. How important is a LibM 32-bit variant to you?
 Submit
 Clear
 Results
»See more