diff --git a/src/reihen.c b/src/reihen.c index b58b27e..d194950 100644 --- a/src/reihen.c +++ b/src/reihen.c @@ -80,4 +80,18 @@ double tanD(double degrees){ } return sinD(degrees)/cosD(degrees); +} + +double atanD(double degrees){ + if (degrees>=360.0){ + degrees = squashDegreesTo360(degrees); + } + + double sum = 0.0; + double radian = radians(degrees); + for (int i = 0; i <= 9; i++){ + sum += powerD((double) i, -1.0) * (powerD(2.0*i+1, radian) / 2.0*i+1); + } + + return sum; } \ No newline at end of file