You are here : cpp0exp

exp() - 0

The C library function double exp(double x) returns the value of e raised to the xth power.


Syntax

double exp(double x)


Example

#include <stdio.h>
#include <math.h>

int main ()
{
   double x = 0;
  
   printf("The exponential value of %lf is %lf\n", x, exp(x));
   printf("The exponential value of %lf is %lf\n", x+1, exp(x+1));
   printf("The exponential value of %lf is %lf\n", x+2, exp(x+2));
   
   return(0);
}


Output / Return Value

The exponential value of 0.000000 is 1.000000
The exponential value of 1.000000 is 2.718282
The exponential value of 2.000000 is 7.389056


Limitations


Alternatives / See Also


Reference