|
|
@ -5,21 +5,10 @@ |
|
|
|
#include "reihen.h" |
|
|
|
#include "exponent.h" |
|
|
|
#include "logarithmus.h" |
|
|
|
#include "util.h" |
|
|
|
|
|
|
|
#define PI pi(1e-8) |
|
|
|
|
|
|
|
unsigned long long fac(int x){ |
|
|
|
unsigned long long prod = 1; |
|
|
|
if(x==0) return 1; |
|
|
|
for (int i = 1; i <= x; i++){ |
|
|
|
if (prod > ULLONG_MAX / i){ |
|
|
|
break; |
|
|
|
} |
|
|
|
prod*=i; |
|
|
|
} |
|
|
|
return prod; |
|
|
|
} |
|
|
|
|
|
|
|
double exponential(double exp){ |
|
|
|
double sum = 0.0; |
|
|
|
for(int i = 0; i<=21; i++){ |
|
|
@ -32,10 +21,6 @@ double euler(){ |
|
|
|
return exponential(1); |
|
|
|
} |
|
|
|
|
|
|
|
double squashDegreesTo360(double degrees){ |
|
|
|
int multiple = degrees / 360; |
|
|
|
return degrees - (360*multiple); |
|
|
|
} |
|
|
|
|
|
|
|
double radians(double degrees){ |
|
|
|
return degrees * PI / 180; |
|
|
|