# libm.info: exp

**Go forward to expm1**

**Go backward to erf**

**Go up to Math**

**Go to the top op libm**

# `exp', `expf'--exponential

*Synopsis*
#include <math.h>
double exp(double X);
float expf(float X);
*Description*
`exp' and `expf' calculate the exponential of X, that is, e raised to
the power X (where e is the base of the natural system of logarithms,
approximately 2.71828).

You can use the (non-ANSI) function `matherr' to specify error
handling for these functions.

*Returns*
On success, `exp' and `expf' return the calculated value. If the
result underflows, the returned value is `0'. If the result overflows,
the returned value is `HUGE_VAL'. In either case, `errno' is set to
`ERANGE'.

*Portability*
`exp' is ANSI C. `expf' is an extension.

Created Mon Nov 8 17:42:56 2004 on tillpc with info_to_html version 0.9.6.