s = sqrt(2) ;
s_v = s ;
for i = 2:30
    
    s  = sqrt ( 2 - 2 * sqrt ( 1 - s*s/4 ) ) ;
    s_v = sqrt ( s_v*s_v / ( 2*(1+sqrt(1-s_v*s_v/4) )  ) ) ; 
    pi_v = 2^i * s_v ; 
    pi_approx = 2^i * s ;
    fprintf( ' %3d : %30.27f %30.27f \n'  , i, pi_approx , pi_v )
end