BRENT'S METHOD never much slower than bisection, usually much faster
The default scalar root-finder in SciPy’s brentq and the engine under MATLAB’s fzero. Keep a bracket [a,b] that always straddles the root; each step, try the fast method (inverse quadratic interpolation or secant) but fall back to bisection whenever the fast step would leave the bracket or stall. You get secant-like speed with bisection’s guarantee — convergence is never lost.
THE TECHNIQUE fast step if safe, bisection if not
Start with a, b where f(a) and f(b) have opposite signs, so a root is trapped between them. Each iteration proposes an inverse-quadratic or secant step; if it lands inside the bracket and makes real progress, take it — otherwise bisect. The bracket only ever shrinks. Solve x² − 2 = 0 and watch which sub-method fires each step. live demo
HISTORY & CREDIT the bracket-keeper is Dekker's
“Brent’s method (1973)” — the debut is 19731971 (Computer Journal 14(4), received Aug 1970); the 1973 book is a re-presentation. cited
antiquity · false position is ancient — the Rhind Papyrus (c. 1550 BCE) uses single false position (one trial value, then scale); the two-guess bracketing form (double false position) and the secant / IQI steps came later, all long predating Brent. 1969 · T. J. Dekker publishes zeroin: the bracket-keeping secant + bisection hybrid with guaranteed convergence — the true origin Brent builds on and even keywords as “Dekker’s algorithm.” 1971 · R. P. Brent adds (1) inverse quadratic interpolation and (2) the safety inequalities that decide when to fall back to bisection — his genuine originality is the safeguarded combination with a proven bound, not any single step. the third name · van Wijngaarden directed the Amsterdam Mathematisch Centrum where Dekker worked; there is no separate van Wijngaarden paper — it is institutional credit (and MathWorld even mis-spells “Deker”).
Guaranteed — but conditional: it needs a sign-changing bracket, so it can’t find even-multiplicity roots (a tangent touch). Brent, 1971
RECOMMEND FOR I-13 a handful of f64 scalars, no array
The whole state is a few numbers; the secant core converges to the true root exactly:
$ i13 run brent.i13 # f(x)=x^2-2, bracket [1,2]
secant steps -> 1.4142135623730951 check: root^2 = 2.0000000000000004
(nearest f64 to sqrt 2; full Brent adds IQI + bisection safeguards)
Recommend:nothing new — the entire method is a handful of f64 scalars: the secant update b − f(b)(b−a)/(f(b)−f(a)), the bisection midpoint (a+b)/2, the sign test f(a)·f(s) < 0, and |·| comparisons for the safeguards — no array at all (verified secant → 1.41421356237, root² = 2). The float / (dart 001) carries it. Note: it composes the corpus’s root-finders — bisection, secant, Newton — into one safeguarded solver; the honest gap is that i13 runs the secant core, while true Brent’s bracket bookkeeping and IQI branch are a real (small) build on top.