ENH: Implement ModAB root-finding algorithm
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 76
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 1
Description
Hi!
Why not implement ModAB root-finding algorithm:
https://github.com/Proektsoft-EOOD/ModAB-Root-Finding/tree/main/Python
The latest version is extremely efficient and robust:
https://www.mdpi.com/1999-4893/19/5/332
Func| bisect| brentq| brenth| ridder| chandr| modAB|
----- | ------: | ------: | ------: | ------: | ------: | ------: |
SUM| 4411| 2548| 2512| 3158| 1873| 1723|
AVG| 48| 28| 27| 34| 20| 19|
MEDIAN| 49| 12| 12| 16| 12| 12|
MIN| 3| 4| 4| 4| 3| 3|
MAX| 53| 102| 102| 202| 58| 55|
FACTOR| 2.560x| 1.479x| 1.458x| 1.833x| 1.087x| 1.000x|
#### Execution times (ms per problem, 100 iterations)
Func| bisect| brentq| brenth| ridder| chandr| modAB|
----- | ------: | ------: | ------: | ------: | ------: | ------: |
SUM| 2842.38| 2077.80| 1464.31| 1854.27| 100429.98| 287.89|
AVG| 30.8954| 22.5848| 15.9164| 20.1551| 1091.6302| 3.1293|
MEDIAN| 29.4968| 9.9226| 9.2430| 11.4640| 702.8896| 2.7059|
MIN| 4.4171| 4.0385| 3.7629| 2.3574| 173.5578| 1.1338|
MAX| 60.1204| 292.9884| 81.5352| 141.5226| 3600.9297| 9.2801|
FACTOR| 9.873x| 7.217x| 5.086x| 6.441x| 348.847x| 1.000x|
#### Notes:
Last Run on: 02.04.2026
Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz (1.50 GHz) with 16.0 GB RAM
Windows 11 Home
numpy Version: 2.4.4
scipy Version: 1.17.1
pymodab Version: 1.0.4
It has been already implemented in the following libraries:
Calcpad - https://calcpad.eu - 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
PyModAB - https://pypi.org/project/pymodab
Contributor guide
Assessment
This issue has not been assessed yet.