%% itersqrtscript
clear
tol=10^(-6);
a=2;
k=1;
suhtero=inf;
x(1)=a;

while(suhtero>tol)
    x(k+1)=(x(k)+a./x(k))/2;
    k=k+1;
    suhtero=abs(x(k)-x(k-1))/abs(x(k-1));
end
x