% P3 

% Find some very short two-root segments and examine
% how long it takes the iteration to converge from the endpoints
clc
disp(' ')
disp('delta                     w1                        steps1       j1')
disp('                          w2                        steps2       j2')
disp('---------------------------------------------------------------------------')
z1 = .3+sqrt(-1);
z2 = .8-sqrt(-.5);
for delta = logspace(-1,-14,14)
   [w1,w2] = Close(z1,z2,delta);
   [steps1,j1] = WhichRoot(w1);
   [steps2,j2] = WhichRoot(w2);
   disp(sprintf('%5.0e  %17.14f + %17.14f i    %5.0f          %1d',delta,real(w1),imag(w1),steps1,j1))
   disp(sprintf('        %17.14f + %17.14f i    %5.0f          %1d',real(w2),imag(w2),steps2,j2))
   disp(' ')
end








