ENH: Implement ModAB root-finding algorithm

Open
#2,021 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Tech stack
python, tensorflow

Research direction

Review TensorFlow Probability's existing root-finding entry points, then compare their scope with the linked ModAB Python implementation and paper. The issue does not identify target files, tests, or an acceptance criterion; completion would require agreeing on the API, integration scope, and validation approach.

Written by the indexing model from the issue text.

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

Dominant language
Jupyter Notebook
Stars
4.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tensorflow/probability

All issues in tensorflow/probability

Similar issues

More Machine Learning issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.