This repository provides efficient implementations of the Modified Anderson-Björck (ModAB) bracketing root-finding algorithm for solving nonlinear equations of the form f(x) = 0.
Available in C, C#, Python, Julia, Zig and C++ (ROOT.CERN framework).
- Guaranteed convergence - Bracketing approach ensures the root is always found.
- Great performance - Fewer function evaluations than Brent, Ridders, and other popular methods. Being simple and lightweight, it has very little computational overhead per iteration.
- Worst-case optimality - Retains the worst-case optimality of Bisection for the hard cases.
- Cross-platform - Python package that works on Windows, Linux, and macOS.
- Multiple languages - Use in your preferred environment.
- Extensive testing and benchmarking - The algorithm is benchmark against a broad set of test functions of many different types.
The ModAB algorithm combines the reliability of bisection with the speed of the secant method:
- Bisection phase - Starts with bisection to ensure stability
- Linearity detection - Monitors when the function behavior is close enough to linear
- False-position acceleration - Switches to false-position method when conditions are favorable
- Anderson-Björck correction - Applies A&B corrections to prevent stalling
- Adaptive fallback - Returns to bisection if progress slows
This hybrid approach achieves superlinear convergence while maintaining the worst-case optimality of bisection.
MIT License - see the LICENSE file for details.
Calcpad - https://www.proektsoft.bg/bg/catalog/221.html - C#
Root-Fortran - https://github.com/jacobwilliams/roots-fortran - Fortran
ROOT.CERN - https://github.com/root-project/root - C++
SCiML/NonlinearSolve.jl - https://github.com/SciML/NonlinearSolve.jl - Julia
JuliaMath/Roots.jl - https://github.com/JuliaMath/Roots.jl - Julia
MultiFloats.jl - https://github.com/dzhang314/MultiFloats.jl - Julia
-
Ganchovski N. Structural Analysis by Functional Modelling in the Cloud. PhD Thesis 2025, UACEG, Sofia
-
Ganchovski, N.; Traykov, A. (2023). "Modified Anderson-Björck's method for solving non-linear equations in structural mechanics." IOP Conference Series: Materials Science and Engineering, 1276(1), 012010. DOI: 10.1088/1757-899X/1276/1/012010
-
Ganchovski, N.; Smith, O.; Rackauckas, C.; Tomov, L.; Traykov, A. (2026). "Improvements of the Modified Anderson-Björck (modAB) Root-Finding Algorithm." Preprints, 2026032190. DOI: 10.20944/preprints202603.2190.v1
Contributions are welcome. You can open an issue or submit a pull request.