Roots.jl
Documentation for Roots.jl
About
Roots is a Julia package for finding zeros of continuous scalar functions of a single real variable using floating point numbers. That is solving $f(x)=0$ for $x$ adjusting for floating-point idiosyncrasies.
The find_zero function provides the primary interface. It supports various algorithms through the specification of a method. These include:
- Bisection-like methods. For functions where a bracketing interval is known (one where $f(a)$ and $f(b)$ have alternate signs), there are several bracketing methods, including
Bisection. For most floating point number types, bisection occurs in a manner exploiting floating point storage conventions leading to an exact zero or a bracketing interval as small as floating point computations allows. Other methods includeA42,AlefeldPotraShi,Roots.Brent,Roots.Chandrapatlu,Roots.ITP,Roots.Ridders, and $12$-flavors ofFalsePosition. The default bracketing method for the basic floating-point types isBisection, as it is more robust to some inputs, butA42andAlefeldPotraShitypically converge in a few iterations and are more performant.
- Several derivative-free methods. These are specified through the methods
Order0,Order1(the secant method),Order2(the Steffensen method),Order5,Order8, andOrder16. The number indicates, roughly, the order of convergence. TheOrder0method is the default, and the most robust, as it finishes off with a bracketing method when a bracket is encountered, The higher order methods promise higher order (faster) convergence, though don't always yield results with fewer function calls thanOrder1orOrder2.Roots.Sidiis a family of methods. The methodsRoots.Order1BandRoots.Order2Bare superlinear and quadratically converging methods independent of the multiplicity of the zero.
- Methods requiring one or more derivatives:
Roots.Newton,Roots.Halleyare classical ones,Roots.QuadraticInverse,Roots.ChebyshevLike,Roots.SuperHalleyare others.Roots.Schroderprovides a quadratic method, like Newton's method, which is independent of the multiplicity of the zero. TheRoots.ThukralXB,X=2,3,4, or5are also multiplicity free. TheXdenotes the number of derivatives that need specifying. TheRoots.LithBoonkkampIJzerman{S,D}methods rememberSsteps and useDderivatives.