# exp(3M)

## NAME

exp - exponential function

## SYNOPSIS

cc [ *flag* ... ] *file* ... -lm [ *library* ... ]
#include <math.h>
double exp(double *x*);

## DESCRIPTION

The exp() function computes the exponential of *x*, defined as
e**x.

## RETURN VALUES

Upon successful completion, exp() returns the exponential of
*x*.
If the correct value would cause overflow, exp() returns
HUGE_VAL and sets errno to ERANGE.
If the correct value would cause underflow to zero, exp()
returns 0 and may set errno to ERANGE.
If *x* is NaN, NaN is returned.
For exceptional cases, **matherr(3M)** tabulates the values to
be returned as dictated by Standards other than XPG4.

## ERRORS

The exp() function will fail if:
ERANGE
The result overflows.
The exp() function may fail if:
ERANGE
The result underflows.

## USAGE

An application wishing to check for error situations should
set errno to 0 before calling exp(). If errno is non-zero
on return, or the return value is NaN an error has
occurred.

## ATTRIBUTES

See **attributes(5)** for descriptions of the following attri-
butes:
____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________*|*_____________________________*|*
| MT-Level | MT-Safe |
|_____________________________*|*_____________________________*|*

## SEE ALSO

**isnan(3M)**, **log(3M)**, **matherr(3M)**, mp(3MP), **attributes(5)**,
**standards(5)**

## NOTES

Prior to Solaris 2.6, there was a conflict between the pow
function in this library and the pow function in the libmp
library. This conflict was resolved by prepending mp_ to all
functions in the libmp library. See mp(3MP) for details.

Man(1) output converted with
man2html