% rndoff - Demo program illustrating round-off error
clear; help rndoff;  % Clear memory and print header
h=1;
for i=1:21
  temp = (10+h)-10;
  hplot(i) = h;
  eplot(i) = abs(temp-h)/h;  % Absolute fractional error
  h = h/10;      
end
loglog(hplot,eplot,'*');
xlabel('h');
ylabel('Fractional error');
title('Round-off Error');
