function z=NewtonTaylorRoots(a)
% NEWTONTAYLORROOTS computes the zeros of a polynomial
%   z=NewtonTaylorRoots(a) computes the zeros of the polynomial given
%   in the vector a using Newton's method by re-expanding the
%   polynomial

n=length(a); degree=n-1;
z=[]; x=0; h=1+sqrt(-1);
for m=degree:-1:1
  while abs(a(m+1))>norm(a)*eps                % Newton iteration 
    x=x+h; a=Taylor(a,h); h=-a(m+1)/a(m);
  end
  a=a(1:m);                                    % deflation 
  z=[z; x];
end