C examples for math.h:exp
function
<cmath> <ctgmath> <math.h>
Returns the base-e exponential function of x, which is e raised to the power x: e^x.
long double expl (long double x); long double exp (long double x); double exp (double x); float expf (float x); float exp (float x); double exp (T x);
Parameter | Description |
---|---|
x | Value of the exponent. |
Exponential value of x.
#include <stdio.h> #include <math.h> int main ()/*from w ww. j a va2s.com*/ { double param = 5.0; double result = exp (param); printf ("The exponential value of %f is %f.\n", param, result ); return 0; }