BRENT is a C++ library which contains algorithms for finding zeros or minima of a scalar function of a scalar variable, by Richard Brent.
The methods do not require the use of derivatives, and do not assume that the function is differentiable.
This file includes some revisions suggested and implemented by John Denker. In particular, it is now possible to pass either a plain function or a C++ functor. Also, a "brent" namespace was defined to make it easier to avoid naming conflicts.
For a short time, the previous code will be available as "brent_old" in a separate directory.
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
BRENT is available in a C version and a C++ version and a FORTRAN77 version and a FORTRAN90 version and a MATLAB version.
ASA047, a C++ library which minimizes a scalar function of several variables using the Nelder-Mead algorithm.
BISECTION_RC, a C++ library which seeks a solution to the equation F(X)=0 using bisection within a user-supplied change of sign interval [A,B]. The procedure is written using reverse communication (RC).
COMPASS_SEARCH, a C++ library which seeks the minimizer of a scalar function of several variables using compass search, a direct search algorithm that does not use derivatives.
GSL, a C++ library which includes rootfinding routines.
TEST_ZERO, a C++ library which defines some test functions for which zeroes can be sought.
TOMS178, a C++ library which optimizes a scalar functional of multiple variables using the Hooke-Jeeves method.
ZERO_RC, a C++ library which seeks solutions of a scalar nonlinear equation f(x) = 0 using reverse communication (RC).
Original FORTRAN77 version by Richard Brent; C++ version by John Burkardt; Modifications by John Denker.
You can go up one level to the C++ source codes.