Browse Source

add exponential function

master
fdai7848 11 months ago
parent
commit
1a5cd4f32e
  1. 8
      src/exponent.c
  2. 1
      src/exponent.h

8
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;
}

1
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
Loading…
Cancel
Save