def brent(func, args=(), brack=None, tol=<NUM_LIT>, full_output=<NUM_LIT:0>, maxiter=<NUM_LIT>):
options = {'<STR_LIT>': tol,<EOL>'<STR_LIT>': maxiter}<EOL>res = _minimize_scalar_brent(func, brack, args, **options)<EOL>if full_output:<EOL><INDENT>return res['<STR_LIT:x>'], res['<STR_LIT>'], res['<STR_LIT>'], res['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>return res['<STR_LIT:x>']<EOL><DEDENT>
Given a function of one-variable and a possible bracketing interval,
return the minimum of the function isolated to a fractional precision of
tol.

Parameters
----------
func : callable f(x,*args)
    Objective function.
args
    Additional arguments (if present).
brack : tuple
    Triple (a,b,c) where (a<b<c) and func(b) <
    func(a),func(c).  If bracket consists of two numbers (a,c)
    then they are assumed to be a starting interval for a
    downhill bracket search (see `bracket`); it doesn't always
    mean that the obtained solution will satisfy a<=x<=c.
tol : float
    Stop if between iteration change is less than `tol`.
full_output : bool
    If True, return all output args (xmin, fval, iter,
    funcalls).
maxiter : int
    Maximum number of iterations in solution.

Returns
-------
xmin : ndarray
    Optimum point.
fval : float
    Optimum value.
iter : int
    Number of iterations.
funcalls : int
    Number of objective function evaluations made.

See also
--------
minimize_scalar: Interface to minimization algorithms for scalar
    univariate functions. See the 'Brent' `method` in particular.

Notes
-----
Uses inverse parabolic interpolation when possible to speed up
convergence of golden section method.