pi_compute.c running (all values are approximate) string pi = 3.1415926535897932384626433832795028841971 21.17f pi = 3.14159265358979312 g pi = 3.14159 4*atan(1) = 3.14159265358979312 4*(5*atan(1/7) + 2*atan(3/79)) = 3.14159265358979312 6*atan(1/sqrt3) b1=1/sqrt3=0.57735 = 3.14159265358979356 12*atan(2-sqrt3) b2=2-sqrt3=0.267949 = 3.14159265358979445 series for atan(x) shows need for x<1/2 for fast convergence x - x^3/3 + x^5/5 - x^7/7 + x^9/9 ...