function [x,iter] = SECANTEtestarret(eps,init1,init2,f,Niter)
x1 = init1; x2 = init2; x2old = (x1+x2)/2; 
e  = x2 - x1; iter = 0; 
while iter < Niter & e > eps 
   delta = f(x2) - f(x1);  
   if delta == 0 
      x1 = (x1+x2)/2; x2 = (x1+x2)/2;   
   else 
      c  = (x1.*f(x2) -x2.*f(x1))./delta; x1 = x2; x2 = c;  
   end 
   e = abs(x2-x2old); x2old = x2; iter = iter +1;  
end
x = x2;  
endfunction
