/*
* recently i saw a code for pi calculation and i couldnt understand it
* at all , the code didnt use trigonometry functions and thats the
* thing hhehehe the code is in http://hack3rs.org/~beck/pi.c
* but this is my lame pi calculation using tan^-1
* covering that 4 multiplied by arc tan of 1/5 minus arc tan minus 1/239
* will give us PI divided by four
* i tried this
* pi/4 = 1-1/3+1/5-1/7+1/9-1/11+1/13 ... blah bleh
* but thats very dirty and i need a lot of operations and fractions
* so you can use your highschool skillz using arc tan
* where tan^-1(x) = x - (x^3)/3 + (x^5)/4 - (x^7)/7 + (x^9)/9 ... blah bleh
* and you make it faster and not with a complex algorithm
*
* beck@g-con.org
*/
#include
const double a = 0.2;
const double b = 0.0041841;
int
main (void)
{
double result = ((4 * atan (a)) - atan (b));
result *= 4;
printf ("%1.50f\n", result);
}