C05AYF locates a simple zero of a continuous function in a given interval using Brent's method, which is a combination of nonlinear interpolation, linear extrapolation and bisection.
C05AYF attempts to obtain an approximation to a simple zero of the function
given an initial interval
such that
.
The same core algorithm is used by
C05AZF whose specification should be consulted for details of the method used.
The approximation
to the zero
is determined so that at least one of the following criteria is satisfied:
(i) |
, |
(ii) |
. |
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
X04AAF).
The levels of accuracy depend on the values of
EPS and
ETA. If full machine accuracy is required, they may be set very small, resulting in an exit with
, although this may involve many more iterations than a lesser accuracy. You are recommended to set
and to use
EPS to control the accuracy, unless you have considerable knowledge of the size of
for values of
near the zero.
Not applicable.
The time taken by C05AYF depends primarily on the time spent evaluating
F (see
Section 5).
If it is important to determine an interval of relative length less than
containing the zero, or if
F is expensive to evaluate and the number of calls to
F is to be restricted, then use of
C05AZF is recommended. Use of
C05AZF is also recommended when the structure of the problem to be solved does not permit a simple
F to be written: the reverse communication facilities of
C05AZF are more flexible than the direct communication of
F required by C05AYF.
None.