f(x)=x^2-2 a=0 b=2 for n=1:52 c=(a+b)/2 println("sqrt(2)=",c," p/m ",(b-a)/2) if f(c)>0 global b=c else global a=c end end