% EX1p9f.m
% Exercise 1.9 (f) on p.43 of Heath
% Compute the areas and the difference in the area using double-precision.
% K. Ming Leung, 02/09/04

clear; format long e;

p4 = 4*pi;
r = 6370;
pr8 = 8*pi*r;
A0 = p4*r*r;
h = 1; 

%hVector = linspace(1e-11,1e-13,101); % Uncomment for detailed results
for n = 1:45;%length(hVector),%45
 %   h = hVector(n);     % Uncomment for detailed results
    A = p4*(r+h)*(r+h);
    dA = A-A0;
    diffA = pr8*h;
    disp([h dA diffA]); 
    h = h/2;
end
