Does anyone know how i can find out exactly how this function is
implemented in C, ie. the code behind exp().
Any help would be much appreciated,
Thanx,
Rob.
Does anyone know how i can find out exactly how this function is
implemented in C, ie. the code behind exp().
Any help would be much appreciated,
Thanx,
Rob.
Assuming you want to implement this function by yourself, I would direct you to this site:
http://www.ualr.edu/~lasmoller/efacts.html
Here it is explained how one can approximate the value of e using series. One of the approximations:
e = 1+ 1/2 + 1/(2 x 3) + 1/(2 x 3 x 4) + 1/(2 x 3 x 4 x 5) + . . .
#include <math.h>
Function: double exp (double x)
Example :
#include <stdio.h>
#include <math.h>
int main(void)
{
double y;
double x=2.37;
y = exp(x);
printf("%f\n",y);
getc(stdin);
return 0;
}