clear all;
x=2; func='20/(x^2+2*x+10)'; kmax=50; toll=10^-10;
format long
err=toll+1;
k=0;
while k<kmax & err>toll
   k=k+1
   xold=x;
   x=eval(func)
   err=abs(x-xold);
end;

format short


