AOCL-LibM is a high-performant implementation of LibM, the standard C library of basic floating-point mathematical functions. It includes many of the functions from the C99 standard. Single and double precision versions of the functions are provided, all optimized for accuracy and performance, including a small number of complex functions. There are also a number of vector and fast scalar variants provided, in which a small amount of the accuracy has been traded for greater performance.
A list of the scalar functions present in the library is provided below. Note that an “f” at the end of the function name indicates that it is single-precision; otherwise, it is double-precision. They can be called by a standard C99 function call and naming convention and must be linked with AOCL-LibM before standard libm.
For example:
$ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/path/to/AOCL-LibM_library
$ clang -Wall -std=c99 myprogram.c -o myprogram –L<Path to AOCL-LibM Library> -lalm -lm
Or
$ gcc -Wall -std=c99 myprogram.c -o myprogram –L<Path to AOCL-LibM Library> -lalm -lm
Trigonometric
Inverse Trigonometric
Hyperbolic
Inverse Hyperbolic
Exponential and Logarithmic
Error
Power and Absolute Value
Nearest Integer
Remainder
Manipulation
Maximum, Minimum and Difference
Please refer to the files BUILDING_on_Linux.txt or BUILDING_on_Windows.txt
AOCL-LibM is developed and maintained by AMD. For support of these libraries and the other tools of AMD Zen Software Studio, see https://www.amd.com/en/developer/aocc/compiler-technical-support.html