% Script MySqrtErr
n = 1000;
x = logspace(0,6,n);
relErr = zeros(1,n);
for k=1:n
    Approx = MySqrt(x(k));
    True   = sqrt(x(k));
    relErr(k) = abs(True - Approx)/True;
end
loglog(x,relErr,'.')
a = min(x);
b = max(x);
axis([a b 10^-18 10^1])
shg

