% hw001.m
% John Burkardt
% Estimate square root of 2017 using iteration.
%
s = sqrt ( 2017 )

r = 1.0
e = abs ( r - s )

r = ( r + 2017 / r ) / 2
e = abs ( r - s )

r = ( r + 2017 / r ) / 2
e = abs ( r - s )

r = ( r + 2017 / r ) / 2
e = abs ( r - s )

r = ( r + 2017 / r ) / 2
e = abs ( r - s )

r = ( r + 2017 / r ) / 2
e = abs ( r - s )

r = ( r + 2017 / r ) / 2
e = abs ( r - s )


