cc [ flag ... ] file ... -lm [ library ... ]
#include <math.h>
double exp(double x);
double expm1(double x);
double log(double x);
double log1p(double x);
double log10(double x);
double pow(double x, double y);
MT-Safe
exp(x) computes the exponential function e**x.
expm1(x) computes (e**x)-1 accurately even for tiny x.
log(x) computes the natural logarithm of x.
log1p(x) computes log(1+x) accurately even for tiny x.
log10(x) computes the base-10 logarithm of x.
pow(x, y) computes x raised to the power y.
In IEEE754 mode (i.e. the -xlibmieee cc compilation option), log(±0) returns -if and raises the division by zero exception; if x<0, log(x) returns a NaN and raises the invalid operation exception; if x == +if or a quiet NaN, log(x) returns x and raises no exception; if x is a signaling NaN, log(x) returns a quiet NaN and raises the invalid operation exception; log(1) returns 0 and raises no exception; for all other positive x, log(x) returns a normalized number and raises the inexact exception.