function root = secant ( f, a, b )

fa = feval ( f, a ); 
fb = feval ( f, b );

dx = abs ( b - a );
format long

while ( abs ( b - a ) > 0.000001 )

  c = ( fb * a - fa *  b ) / ( fb - fa );
  fc = feval ( f, c );

  [  a,  c,  b ;
    fa, fc, fb ]

  dx_old = dx;
  dx = abs ( c - b );
  dx / dx_old

  if ( fc == 0 ) 
    root = c;
    return
  end

  a = b;
  b = c;
  fa = fb;
  fb = fc;

  pause

end

root = 0.5 * ( a + b );
