Description
Roots.jl is a Julia package of root-finding routines. It finds the roots, or zeros, of scalar functions of a single real variable using floating-point math. The find_zero function is the main interface. You pass it a function, a starting point or bracketing interval, an optional method argument that changes the algorithm, and any parameters. Bracketing methods such as Bisection work when you know a sign change in the interval. Bisection is the default for most floating-point types and is written to take advantage of how floats are stored. For other number types, such as BigFloat, the Alefeld, Potra and Shi algorithm is used by default, and both defaults are guaranteed to converge. Derivative-free methods are named Order0, Order1 (the secant method), Order2 (Steffensen's method), Order5, Order8 and Order16, where the number roughly gives the order of convergence. Order0 is the most robust and is the default. Order1B and Order2B converge superlinearly and quadratically whatever the multiplicity of the zero. Older methods such as Newton need a derivative to be specified. The documentation covers the CommonSolve interface, multiple zeros and convergence.…
Highlights
- find_zero as the main interface
- Bracketing methods, including Bisection
- Derivative-free methods from Order0 to Order16
- Default methods for floats and BigFloat
- Derivative-based Newton-style methods
Ratings & Reviews
No ratings yet
Be the first to rate Roots.jl.
People also visit
Roots.jl FAQ
What is Roots.jl?
A Julia package for finding roots, or zeros, of scalar functions of one real variable.
How do I call it?
Use find_zero(f, x0, ...), where x0 is a starting point or a bracketing interval.
What is the default method?
Order0, the most robust method, which uses a bracketing method when it can. Bisection is used for most floating point types.
Which methods converge fastest?
The higher-order methods Order5, Order8 and Order16 promise faster convergence, though not always fewer function calls.
Do I need derivatives?
Not for the derivative-free methods. The historic Newton-style methods need a derivative to be specified.
What are the best Roots.jl alternatives?
Popular alternatives to Roots.jl include QuadGK.jl, SpecialFunctions.jl and Polynomials.jl. See all Roots.jl alternatives




