clear all

tol = 1;
val = 1;
idx = 1;
while ( val + tol > val && idx <= 100 )
    fprintf('tol(%2.0f) = %24.16e \n',idx,tol);
    tol = tol / 2;
    idx = idx + 1;
end