brent

Functions
brent f &key (y 0) initial-value lower-bound upper-bound (max-iter 1000) rel-tol (abs-tol 0)
brent  f &key (y 0) initial-value lower-bound upper-bound (max-iter 1000) rel-tol (abs-tol 0)  [Function]
Solve univariate function 'y = f(x)' using Brent's method.

First argument F is a function taking one numeric argument.
 Return value of F has to be a real number.
Keyword argument Y is the function value.  Default is zero.
Keyword argument INITIAL-VALUE is the initial value for the
 function argument X.
Keyword arguments LOWER-BOUND and UPPER-BOUND specify the
 interval bounds between which the root is searched.  If any
 one of these two arguments is omitted, the interval bounds
 are determined automatically around INITIAL-VALUE.
Keyword argument MAX-ITER is the maximum number of iterations
 to be performed.  Default is 1000.
Keyword argument REL-TOL is the relative tolerance.  Default
 is machine precision.
Keyword argument ABS-TOL is the absolute tolerance.  Default
 is zero.

The iteration stops if half of the interval is less than
or equal to '2 * REL-TOL * |x| + ABS-TOL / 2'.

Primary value is the argument X for which 'y = f(x)' is true.
Secondary value is the number of iterations performed; nil
means that the algorithm did not converge within the given
number of iterations.