Next: exp10
, exp10f
—exponential, base 10, Previous: erf
, erff
, erfc
, erfcf
—error function, Up: Mathematical Functions (math.h) [Contents][Index]
exp
, expf
—exponentialSynopsis
#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).
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.