def brent(func, args=(), brack=None, tol=1.48e-08, full_output=0, maxiter=500):
 options = {'xtol': tol, 'maxiter': maxiter}
 res = _minimize_scalar_brent(func, brack, args, **options)
 if full_output:
  return (res['x'], res['fun'], res['nit'], res['nfev'])
 else:
  return res['x']

def brent ( func , args = ( ) , brack = None , tol = 1.48e-08 , full_output = 0 , maxiter = 500 ) : options = { 'xtol' : tol , 'maxiter' : maxiter } res = _minimize_scalar_brent ( func , brack , args , ** options ) if full_output : return ( res [ 'x' ] , res [ 'fun' ] , res [ 'nit' ] , res [ 'nfev' ] ) else : return res [ 'x' ]
given a function of one-variable and a possible bracketing interval .