def brentq(f, a, b, args=(), xtol=_xtol, rtol=_rtol, maxiter=_iter, full_output=False, disp=True):
 if (not isinstance(args, tuple)):
  args = (args,)
 if (xtol <= 0):
  raise ValueError(('xtol too small (%g <= 0)' % xtol))
 if (rtol < _rtol):
  raise ValueError(('rtol too small (%g < %g)' % (rtol, _rtol)))
 r = _zeros._brentq(f, a, b, xtol, rtol, maxiter, args, full_output, disp)
 return results_c(full_output, r)

def brentq ( f , a , b , args = ( ) , xtol = _xtol , rtol = _rtol , maxiter = _iter , full_output = False , disp = True ) : if ( not isinstance ( args , tuple ) ) : args = ( args , ) if ( xtol <= 0 ) : raise ValueError ( ( 'xtol too small (%g <= 0)' % xtol ) ) if ( rtol < _rtol ) : raise ValueError ( ( 'rtol too small (%g < %g)' % ( rtol , _rtol ) ) ) r = _zeros . _brentq ( f , a , b , xtol , rtol , maxiter , args , full_output , disp ) return results_c ( full_output , r )
find a root of a function in a bracketing interval using brents method .