test_zero, a Fortran90 code which defines nonlinear functions that may be used to test zero finders.
Zero finders are programs that seek a (scalar) root of a scalar equation F(X) = 0. Some zero finders require that an initial "change-of-sign" interval [A,B] be supplied, with the function having opposite sign at the two endpoints, thus guaranteeing that there is some value C between A and B for which F(C) = 0 (assuming that the function F is continuous). In other cases, a particular zero finder may want information about the first or second derivative of the function. And some zero finders can handle situations where the function has a multiple root, or where the function is a polynomial.
The code supplies a set of nonlinear functions, along with change of sign interval, first and second derivatives, suggested starting points, so that the behavior of any zero finder can be analyzed.
The code also includes implementations of some simple zero finders, as a demonstration of how the package might be used.
The functions, which are accessible by number, are
The information on this web page is distributed under the MIT license.
test_zero is available in a C version and a C++ version and a Fortran90 version and a MATLAB version and an Octave version and a Python version.
bisection, a Fortran90 code which applies the bisection method to seek a root of f(x) over a change-of-sign interval a <= x <= b.
bisection_integer, a Fortran90 code which seeks an integer solution to the equation F(X)=0, using bisection within a user-supplied change of sign interval [A,B].
bisection_rc, a Fortran90 code 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).
nms, a Fortran90 code which includes the zero finder fzero().
zero_brent, a Fortran90 code which seeks a solution of a scalar nonlinear equation f(x) = 0, by Richard Brent.
zero_itp, a Fortran90 code which finds a zero of a scalar function of a scalar variable, starting from a change of sign interval, using the Interpolate/Truncate/Project (ITP) method, which has faster convergence than the bisection method.
zero_laguerre, a Fortran90 code which uses Laguerre's method to find the zero of a function. The method needs first and second derivative information. The method almost always works when the function is a polynomial.
zero_muller, a Fortran90 code which seeks a root of a nonlinear equation using the Muller method, with complex arithmetic.
zero_rc, a Fortran90 code which seeks solutions of a scalar nonlinear equation f(x) = 0, or a system of nonlinear equations, using reverse communication (RC).
zoomin, a Fortran90 code which includes various zero finder routines.