diff --git a/src/exponent.c b/src/exponent.c index e82de4e..b1135fd 100644 --- a/src/exponent.c +++ b/src/exponent.c @@ -39,3 +39,11 @@ unsigned long long fac(int x){ return prod; } + +double exponential(double x){ + double sum = 0.0; + for(int i = 1; i<=21; i++){ + sum += (1/fac(i)*(expIN(i,x))); + } + return sum; +} \ No newline at end of file diff --git a/src/exponent.h b/src/exponent.h index 8f77ae2..8a09fec 100644 --- a/src/exponent.h +++ b/src/exponent.h @@ -3,5 +3,6 @@ double expI(double e, double num); double expIN(double e, double num); +double exponential(double x); #endif // exponent.h \ No newline at end of file