% computing square root of 3 using Newton method 
% (using while loop)

epsilon=0.001;
u = 2;
v = u/2 + 3/2/u;
while (abs(u-v)>= epsilon/10)
    u = v;
    v = v/2+3/2/v;
end
v