f=@(x) x^2-1900*x+1; tor=10^-18; p1=0; p2=1; q1=f(p1); q2=f(p2); i=1; while(i<40) p=p2-(q2*(p1-p2)/(q1-q2)); q=f(p); if(abs(p2-p)