exp(3M)
NAME
exp, expm1, log, log1p, log10, pow − exponential, logarithm, power
SYNOPSIS
#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-LEVEL
MT-Safe with exceptions
DESCRIPTION
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.
RETURN VALUES
For exceptional cases, matherr(3M) tabulates the values to be returned as dictated by various Standards.
SEE ALSO
DIAGNOSTICS
In IEEE754 mode (i.e. the −xlibmieee cc compilation option), log(±0) returns −∞ and raises the division by zero exception; if x<0, log(x) returns a NaN and raises the invalid operation exception; if x == +∞ 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.
NOTES
These functions are MT-Safe when compiled with the shared library, libm.so, but are unsafe if compiled with the archived library libm.a.
SunOS 5.2 — Last change: 5 Mar 1993