% Nasser M. Abbasi.  Do computation using 32 bit
% Computing derivative of arctan(x) at =sqrt(2) as a function
% of changing h in Taylor approximation.

h = single(1);
M = 26;
X = single(sqrt(2));
f = @(x) single(atan(x));

F1 = f(X);
S  = zeros(25,6,'single');

for k = 1:M
    F2 = f(X+h);
    d  = single(F2-F1);
    r  = single(d/h);
    S(k,1) = k;
    S(k,2) = h;
    S(k,3) = F2;
    S(k,4) = F1;
    S(k,5) = d;
    S(k,6) = r;
    h = single(h/2);
end

format long g
S