// secante.sci

function  [raiz, eps] = secante (f, x0, x1, it)
  for i = 1:it do
    d = (x1 - x0) / (f(x1) - f(x0)) * f(x1);
    x0 = x1;
    x1 = x1 - d;
  end
  raiz = x1;
  eps = abs(x1 - x0);
endfunction

