Description Usage Arguments Details Value References See Also Examples
Find a single root of a function of one variable within a specified interval.
1 |
f |
A real function of a single variable. |
interval |
A vector of two real numbers defining the ends of the interval in which to search. |
tol |
A tolerance for the root. When the interval within which a root exists is smaller than |
maxiter |
A limit on the number of function evaluations permitted in the attempt to find a root. |
trace |
If TRUE, provided diagnostic output of the process of rootfinding. |
... |
Extra data needed to compute the function |
This routine is an all-R translation of Algorithm 18 of Nash (1979). This is a variant of the Dekker-Brent approach. At the time it was written, the goal was to produce a very short code that was robust in a low-precision environment.
The output is a list consisting of
root The estimate, b, of the position of the root.
froot The value of the function at this point, f(b).
rtol The width of the interval in which the root exists.
fcount The number of function evaluations used.
Nash, John C. (1979) Compact numerical methods: linear algebra and function minimisation. Bristol UK: Adam Hilger.
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.