horzLine = '_________________________';
fprintf('\n\n Homework #5, problem 1a');
fprintf('\n Error = sin(1) + sin(1+odd*pi)');
fprintf('\n\n  n  |   Error   |   m \n%s\n', horzLine);
x = 1;

for n=1:2:21
    error = abs( sin(x+n*pi) + sin(x) );
    bits = error * 2^53;
    fprintf(' %2d  |  %7.1e  |  %2d  \n', n, error, bits);
end

fprintf('%s\n\n This proves that error = integer * 2^(-53)\n\n', horzLine);
