Improvements to the Modified Anderson–Björck (modAB) Root-Finding Algorithm
Abstract
1. Introduction
2. The Original Modified Anderson–Björck (modAB) Algorithm
- An intermediate point is calculated by linear interpolation:
- The ordinate of the end that remained fixed at the previous iteration is reduced by a factor m. For the left end, it is calculated by the expression y1 = f(x1) · m, where m = 1 − f(x3)/f(x2) if m > 0; otherwise, m = 0.5. For the right end, the equation is obtained by swapping indices 1 and 2, as follows: y2 = f(x2) · m, where m = 1 − f(x3)/f(x1) if m > 0; otherwise, m = 0.5.
3. Drawbacks of the Original Algorithm
- The deviation factor k in Equation (2) has a fixed value of k = 0.25 as a good average estimate, experimentally tuned on a larger set of functions. However, this is not optimal because it does not account for the properties of the function in the selected interval.
- Although the possibility of a redundant switch to AB was discussed in [6], not much research has been done on the subject. Only a simple bisection fallback is included as a safety mechanism if the algorithm fails to converge within the expected number of iterations. It is proposed empirically to be half of the required bisection steps. This is a simple and conservative approach, but in certain cases, it may result in unnecessary AB steps before the algorithm recognizes that it is not converging as intended.
- The original algorithm uses the termination criteria of the false-position method: |xn – xn−1| < ε. Further tests have shown that it fails for certain functions that are flat near the root, but with large ordinates at endpoints (>1/ε). This can cause the interpolation point to crawl very slowly along the abscissa, so the step may become lower than ε, even if we are still too far from the root.
- The benchmarks in the original paper [6] were based on the number of iterations with a factor of two for Ridder’s method. However, the number of function evaluations is more closely related to the actual performance, especially when the function is computationally expensive.
- In the original paper, we used 21 functions to benchmark the method performance. This set is very limited, which can lead to some distortion in the results. Therefore, the set may be considered insufficient to derive reliable conclusions. It may turn out that some algorithms are particularly suitable for a larger part of the functions in the set, showing a false advantage. That is why additional tests were performed in [7] with a set of 50 functions.
4. Improvements to the modAB Algorithm
4.1. Adaptive Value of Deviation Factor k
4.2. Adaptive Bisection Fallback Criterion
4.3. New Termination Check
4.4. The Improved Algorithm
| Algorithm 1: The improved modAB algorithm. |
| 1. Calculate points p1: x1, y1 = f(x1) and p2: x2, y2 = f(x2) 2. initialize “method” to “bisection” and “side” to “none” 3. for iter = 1 to maxIterations 4. if “method” is “bisection” then: 5. calculate x3 as the midpoint: x3 = (x1 + x2)/2 6. else if method is “Anderson-Björck” then: 7. calculate x3 as the secant point: x3 = (x1*y2 − y1*x2)/(y2 − y1) 8. end 9. if the x-convergence check x2 − x1 ≤ εabs + εrel*|x3| is satisfied then: 10. stop and return x3 as a result (avoids redundant evaluation of y3 = f(x3)) 11. end 12. if “method” is “bisection” then: 13. calculate p3: x3, y3 = f(x3) 14. calculate the average ordinate by the equation: ym = (y1 + y2)/2 15. calculate r to Equation (4) and k = r2 16. if the function is close enough to linear, satisfying that _ |ym − y3| < k (|y3| + |ym|) then: 17. change the method to “Anderson-Björck” 18. end 19. else if method is “Anderson-Björck” then: 20. calculate p3: x3, y3 = f(x3) and clamp it between p1 and p2 _ (in case floating point round-off errors shoot it outside the interval) 21. end 22. if the y-convergence check y3 = 0 is satisfied then: 23. stop and return x3 as a result 24. end 25. if y1 and y3 have equal signs then: 26. if “method” is “Anderson-Björck” then: (apply AB correction) 27. if “side” is “right” then 28. calculate m = 1 − y3/y1 29. if m ≤ 0 then: divide y2 by 2 else: multiply y2 by m 30. else: 31. change “side” to “right” 32. end 33. end 34. for both methods, shrink the interval from left by setting p1 = p3 35. else 36. if “method” is “Anderson-Björck” then: 37. if “side” is “left” then: 38. calculate m = 1 − y3/y2 39. if m ≤ 0 then: divide y1 by 2 else: multiply y1 by m 40. else: 41. change “side” to “left” 42. end 43. end 44. for both methods, shrink the interval from right by setting p2 = p3 45. end 46. if AB fails to shrink the interval more than bisection would, then: 47. reset the method back to “bisection” 48. end 49. end 50. return error, if failed to converge for the expected number of iterations |
4.5. Convergence
4.6. Practical Use and Implementation in Software
5. Numerical Experiments
6. Discussion
7. Conclusions
Supplementary Materials
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
| AB | Anderson–Björck |
| modAB | Modified Anderson–Björck |
| ITP | Interpolate, Truncate, Project |
Appendix A
| 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 70. 71. 72. 73. 74. 75. 76. 77. 78. 79. 80. 81. 82. 83. 84. | // Struct to store calculation nodes abscissas and ordinates private struct Node { public double X; public double Y; public Node(double x, double y) { X = x; Y = y; } public Node(double x, Func<double, double> F) { X = x; Y = F(x); } public static double Sec(Node p1, Node p2) => (p1.X * p2.Y - p1.Y * p2.X) / (p2.Y - p1.Y); public static double Mid(Node p1, Node p2) => (p1.X + p2.X) / 2.0; } // Initializes the interval and checks if bracketing is applicable private static bool Initialize(double x1, double x2, Func<double, double> F, out Node p1, out Node p2) { if (x1 > x2) { p1 = new(x2, F); p2 = new(x1, F); } else { p1 = new(x1, F); p2 = new(x2, F); } return Math.Sign(p1.Y) != Math.Sign(p2.Y); } // Finds the root of F(x) = 0 within the interval [x1, x2] with the specified // absolute (aTol) and relative (rTol) precisions, using the improved modAB // algorithm. F(x) must be continuous and sign(F(x1)) ≠ sign(F(x2)) public static double ModAB(Func<double, double> F, double x1, double x2, double aTol = 1e-14, double rTol = 1e-14, int maxIterations = 200) { if (!Initialize(x1, x2, F, out Node p1, out Node p2)) return double.NaN; var bisection = true; // Initialize the method to bisection var side = 0; // Store the side that moved last: // -1 for left, 1 for right, 0 for none var threshold = p2.X - p1.X; // Threshold to reset to bisection const double C = 16; // Safety factor of 4 iterations behind the threshold for (int i = 1; i <= MaxIterations; ++i) { var x3 = bisection ? Node.Mid(p1, p2) : Node.Sec(p1, p2); // Check for x-convergence and return the result if (p2.X - p1.X <= aTol + rTol * Math.Abs(x3)) return x3; Node p3; if (bisection) { p3 = new Node(x3, F); double y1 = p1.Y, y2 = p2.Y; var ym = 0.5 * (y1 + y2); var r = 1 - Math.Abs(ym / (y2 - y1)); // Symmetry factor var k = r * r; // Deviation factor // If function is close enough to linear if (Math.Abs(ym - p3.Y) < k * (Math.Abs(p3.Y) + Math.Abs(ym))) { bisection = false; // switch to false-position threshold = (p2.X - p1.X) * C; } } else { // Clamp the secant point to the interval [p1.X, p2.X] // Otherwise, for very flat functions, floating-point // round-off errors can shoot the point outside if (x3 <= p1.X) p3 = p1; else if (x3 >= p2.X) p3 = p2; else p3 = new Node(x3, F); // Evaluate only if not clamped threshold * = 0.5; } // Check for y-convergence and return the result if (p3.Y == 0) return x3; if (Math.Sign(p1.Y) == Math.Sign(p3.Y)) { if (side == 1) { var m = 1 - p3.Y / p1.Y; // Apply Anderson-Björck correction p2.Y *= m <= 0 ? 0.5 : m; // to the right side } else if (!bisection) side = 1; p1 = p3; } else { if (side == -1) { var m = 1 - p3.Y / p2.Y; // Apply Anderson-Björck correction p1.Y *= m <= 0 ? 0.5 : m; // to the left side } else if (!bisection) side = -1; p2 = p3; } // If Anderson-Björck fails to shrink the interval enough if (p2.X - p1.X > threshold) { bisection = true; // reset to bisection side = 0; } } return double.NaN; // When failed to converge within maxIterations } |
References
- Dowell, M.; Jarratt, P. A modified regula falsi method for computing the root of an equation. BIT 1971, 11, 168–174. [Google Scholar] [CrossRef]
- Ridders, C. A new algorithm for computing a single root of a real continuous function. IEEE Trans. Circuits Syst. 1979, 26, 979–980. [Google Scholar] [CrossRef]
- Sabharwal, C. Blended Root Finding Algorithm Outperforms Bisection and Regula Falsi Algorithms. Mathematics 2019, 7, 1118. [Google Scholar] [CrossRef]
- Brent, R. An algorithm with guaranteed convergence for finding a zero of a function. Comput. J. 1971, 14, 422–425. [Google Scholar] [CrossRef]
- Oliveira, I.; Takahashi, R. An Enhancement of the Bisection Method Average Performance Preserving Minmax Optimality. ACM Trans. Math. Softw. 2021, 47, 5. [Google Scholar] [CrossRef]
- Ganchovski, N.; Traykov, A. Modified Anderson-Björck’s method for solving non-linear equations in structural mechanics. IOP Conf. Ser. Mater. Sci. Eng. 2023, 1276, 012010. [Google Scholar] [CrossRef]
- Ganchovski, N. Structural Analysis by Functional Modelling in the Cloud. Ph.D. Thesis, UACEG, Sofia, Bulgaria, 2025. [Google Scholar]
- Ganchovski, N. Calcpad—A Free and Open-Source Software for Engineering Calculations. Available online: https://calcpad.eu/ (accessed on 16 April 2026).
- Williams, J. Roots-Fortran: Root Solvers for Modern Fortran; NASA JSC: Houston, TX, USA, 2025; Available online: https://jacobwilliams.github.io/roots-fortran/ (accessed on 25 March 2026).
- Anderson, N.; Björck, Å. A new high order method of regula falsi type for computing a root of an equation. BIT 1973, 13, 253–264. [Google Scholar] [CrossRef]
- Pal, A.; Holtorf, F.; Larsson, A.; Loman, T.; Utkarsh; Schäfer, F.; Qu, Q.; Edelman, A.; Rackauckas, C. NonlinearSolve.jl: High-Performance and Robust Solvers for Systems of Nonlinear Equations in Julia. ACM Trans. Math. Softw. 2026, 52, 1. [Google Scholar] [CrossRef]
- Verzani, J. Roots.jl: Root Finding Functions for Julia. 2020. Available online: https://github.com/JuliaMath/Roots.jl (accessed on 25 March 2026).
- Brun, R.; Rademakers, F. ROOT—An Object Oriented Data Analysis Framework. Nucl. Inst. Meth. Phys. Res. A 1997, 389, 81–86. [Google Scholar] [CrossRef]
- PyModAB—Fast and Robust Root-Finding Library Using the Modified Anderson-Bjork Method. Available online: https://pypi.org/project/pymodab/ (accessed on 10 April 2026).
- Press, W.; Teukolsky, S.; Vetterling, W.; Flannery, B. Numerical Recipes: The Art of Scientific Computing, 3rd ed.; Cambridge University Press: Cambridge, MA, USA, 2007. [Google Scholar]
- Galdino, S. A family of regula falsi root-finding methods. In Proceedings of 2011 World Congress on Engineering and Technology; IEEE Press: Shanghai, China, 2011; pp. 514–517. [Google Scholar]
- Stage, S.A. Comments on An Improvement to the Brent’s Method. Int. J. Exp. Algorithms 2013, 4, 1–16. [Google Scholar]
- Swift, A.; Lindfield, G.R. Comparison of a continuation method with Brent’s method for the numerical solution of a single nonlinear equation. Comput. J. 1978, 21, 359–362. [Google Scholar] [CrossRef][Green Version]
- Suhadolnik, A. Combined bracketing methods for solving nonlinear equations. Appl. Math. Lett. 2012, 25, 1755–1760. [Google Scholar] [CrossRef]
- BenchmarkDotNet: Powerful. NET Library for Benchmarking. Available online: https://benchmarkdotnet.org/ (accessed on 10 April 2026).



| Algorithm | Iteration Number | |||
|---|---|---|---|---|
| Switch to AB | Fallback to Bisection | Switch to AB | Converge and Quit | |
| The original modAB 2023 [6] fixed criteria | 1 | 24 | 34 | 40 |
| The proposed new adaptive criteria | 1 | 7 | 15 | 24 |
| Function | Interval | Method | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| a | b | bs | fp | ill | AB | ITP | Rid | Bre | modAB 1 | modAB 2 | |
| f01(x) = x3 − 1 | 0.5 | 1.5 | 3 | 34 | 10 | 9 | 10 | 4 | 10 | 3 | 3 |
| f02(x) = x2 (x2/3 + sqrt(2) · sin(x)) − sqrt(x)/18 | 0.1 | 1 | 48 | 87 | 12 | 12 | 39 | 16 | 13 | 12 | 12 |
| f03(x) = 11x11 − 1 | 0.1 | 1 | 48 | 108 | 16 | 23 | 50 | 14 | 12 | 13 | 15 |
| f04(x) = x3 + 1 | −1.8 | 0 | 49 | 50 | 13 | 11 | 12 | 12 | 10 | 10 | 10 |
| f05(x) = x3 − 2x − 5 | 2 | 3 | 47 | 32 | 9 | 8 | 51 | 14 | 8 | 10 | 12 |
| f06(x) = 2x · exp(−5) + 1 − 2 · exp(−5x) | 0 | 1 | 49 | 30 | 10 | 10 | 13 | 14 | 10 | 12 | 10 |
| f07(x) = 2x · exp(−10) + 1 − 2 · exp(−10x) | 0 | 1 | 49 | 31 | 13 | 11 | 15 | 14 | 12 | 13 | 11 |
| f08(x) = 2x · exp(−20) + 1 − 2 · exp(−20x) | 0 | 1 | 49 | 31 | 13 | 13 | 17 | 12 | 12 | 13 | 12 |
| f09(x) = (1 + (1 − 5)2) · x2 − (1 − 5x)2 | 0 | 1 | 49 | 17 | 12 | 9 | 48 | 16 | 10 | 12 | 11 |
| f10(x) = (1 + (1 − 10)2) · x2 − (1 − 10x)2 | 0 | 1 | 49 | 14 | 10 | 9 | 12 | 16 | 10 | 9 | 9 |
| f11(x) = (1 + (1 − 20)2) · x2 − (1 − 20x)2 | 0 | 1 | 49 | 12 | 10 | 8 | 10 | 16 | 9 | 9 | 9 |
| f12(x) = x2 − (1 − x)5 | 0 | 1 | 49 | 41 | 10 | 9 | 11 | 14 | 9 | 12 | 11 |
| f13(x) = x2 − (1 − x)10 | 0 | 1 | 49 | 83 | 12 | 10 | 49 | 16 | 10 | 12 | 12 |
| f14(x) = x2 − (1 − x)20 | 0 | 1 | 49 | 171 | 12 | 12 | 50 | 16 | 13 | 13 | 12 |
| f15(x) = (1 + (1 − 5)4) · x − (1 − 5x)4 | 0 | 1 | 49 | 9 | 9 | 7 | 10 | 12 | 8 | 9 | 9 |
| f16(x) = (1 + (1 − 10)4) · x − (1 − 10x)4 | 0 | 1 | 49 | 6 | 7 | 6 | 9 | 12 | 7 | 8 | 8 |
| f17(x) = (1 + (1 − 20)4) · x − (1 − 20x)4 | 0 | 1 | 49 | 6 | 7 | 6 | 9 | 12 | 7 | 8 | 8 |
| f18(x) = exp(−5x) · (x − 1) + x5 | 0 | 1 | 48 | 81 | 10 | 8 | 37 | 14 | 9 | 11 | 11 |
| f19(x) = exp(−10x) · (x − 1) + x10 | 0 | 1 | 48 | 202 | 14 | 9 | 11 | 16 | 9 | 13 | 12 |
| f20(x) = exp(−20x) · (x − 1) + x20 | 0 | 1 | 48 | 202 | 22 | 10 | 12 | 16 | 13 | 13 | 14 |
| f21(x) = x2 + sin(x/5) − 1/4 | 0 | 1 | 49 | 34 | 10 | 9 | 10 | 12 | 11 | 12 | 9 |
| f22(x) = x2 + sin(x/10) − 1/4 | 0 | 1 | 48 | 33 | 11 | 9 | 10 | 12 | 10 | 9 | 9 |
| f23(x) = x2 + sin(x/20) − 1/4 | 0 | 1 | 48 | 32 | 12 | 9 | 10 | 12 | 10 | 9 | 9 |
| f24(x) = (x + 2) · (x + 1) · (x − 3)3 | 2.6 | 4.6 | 48 | 202 | 91 | 108 | 51 | 80 | 137 | 49 | 48 |
| f25(x) = (x − 4)5 · log(x) | 3.6 | 5.6 | 48 | 202 | 174 | 188 | 51 | 62 | 118 | 49 | 48 |
| f26(x) = (sin(x) − x/4)3 | 2 | 4 | 48 | 202 | 91 | 108 | 51 | 78 | 137 | 49 | 48 |
| f27(x) = (81 − p(x) · (108 − p(x) · (54 − p(x) · (12 − p(x))))) · sign (p(x) − 3), where p(x) = x + 1.11111 | 1 | 3 | 14 | 202 | 35 | 38 | 22 | 24 | 31 | 14 | 14 |
| f28(x) = sin(x − 7.143)3) | 7 | 8 | 46 | 202 | 87 | 102 | 50 | 70 | 131 | 47 | 46 |
| f29(x) = exp((x − 3)5) − 1 | 2.6 | 4.6 | 12 | 202 | 59 | 46 | 3 | 18 | 30 | 12 | 12 |
| f30(x) = exp((x − 3)5) − exp(x − 1) | 4 | 5 | 47 | 202 | 52 | 57 | 50 | 16 | 14 | 14 | 13 |
| f31(x) = π − 1/x | 0.05 | 5 | 51 | 192 | 15 | 7 | 53 | 16 | 12 | 13 | 12 |
| f32(x) = 4 − tan(x) | 0 | 1.5 | 48 | 92 | 14 | 11 | 51 | 16 | 13 | 13 | 14 |
| f33(x) = cos(x) − x3 | 0 | 4 | 50 | 200 | 15 | 15 | 11 | 18 | 15 | 13 | 12 |
| f34(x) = cos(x) − x | −11 | 9 | 53 | 11 | 10 | 9 | 11 | 16 | 10 | 10 | 11 |
| f35(x) = sqrt(abs(x − 2/3)) · if(x ≤ 2/3; 1; −1) − 0.1 | −11 | 9 | 53 | 15 | 16 | 13 | 54 | 24 | 11 | 18 | 17 |
| f36 (x) = abs(x − 2/3)0.2 · if(x ≤ 2/3; 1; −1) | −11 | 9 | 53 | 44 | 47 | 54 | 46 | 54 | 44 | 54 | 55 |
| f37(x) = (x − 7/9)3 + (x − 7/9) · 10−3 | −11 | 9 | 52 | 202 | 25 | 27 | 13 | 24 | 31 | 18 | 16 |
| f38(x) = if(x ≤ 1/3; −0.5; 0.5) | −11 | 9 | 53 | 53 | 61 | 61 | 53 | 56 | 53 | 54 | 53 |
| f39(x) = if(x ≤ 1/3; −10−3; 1 − 10−3) | −11 | 9 | 53 | 202 | 172 | 172 | 55 | 84 | 83 | 54 | 53 |
| f40(x) = if(x = 0; 0.0; 1/(x − 2/3)) | −11 | 9 | 53 | 8 | 100 | 100 | 55 | 60 | 55 | 54 | 53 |
| f41(x) = 2x · exp(−5) − 2 · exp(−5x) + 1 | 0 | 10 | 52 | 33 | 14 | 13 | 17 | 14 | 13 | 15 | 13 |
| f42(x) = (x2 − x − 6) · (x2 − 3x + 2) | 0 | π | 50 | 23 | 12 | 9 | 16 | 18 | 10 | 13 | 12 |
| f43(x) = x3 | −1 | 1.5 | 50 | 202 | 94 | 113 | 52 | 84 | 124 | 51 | 50 |
| f44(x) = x5 | −1 | 1.5 | 50 | 202 | 183 | 202 | 52 | 56 | 127 | 51 | 50 |
| f45(x) = x7 | −1 | 1.5 | 50 | 202 | 202 | 202 | 52 | 52 | 135 | 51 | 50 |
| f46(x) = (exp(−5x) − x − 0.5)/x5 | 0.09 | 0.7 | 48 | 202 | 25 | 23 | 50 | 14 | 15 | 14 | 14 |
| f47(x) = 1/sqrt(x) − 2 · log (5 · 103 · sqrt(x)) + 0.8 | 0.0005 | 0.5 | 48 | 155 | 16 | 13 | 49 | 18 | 16 | 16 | 16 |
| f48(x) = 1/sqrt(x) − 2 · log(5 · 107 · sqrt(x)) + 0.8 | 0.0005 | 0.5 | 48 | 44 | 15 | 13 | 20 | 18 | 16 | 19 | 14 |
| f49(x) = if (x ≤ 0; −x3 − x − 1; x1/3 − x − 1) | −1 | 1 | 49 | 26 | 12 | 9 | 12 | 12 | 11 | 12 | 12 |
| f50(x) = x3 − 2x − x + 3 | −3 | 2 | 50 | 41 | 15 | 13 | 16 | 14 | 12 | 12 | 11 |
| f51(x) = log(x) | 0.5 | 5 | 50 | 28 | 12 | 9 | 12 | 12 | 10 | 11 | 10 |
| f52(x) = (10 − x) · exp(−10x) − x10 + 1 | 0.5 | 8 | 51 | 202 | 38 | 20 | 54 | 18 | 17 | 15 | 15 |
| f53(x) = exp(sin(x)) − x − 1 | 1.0 | 4 | 49 | 32 | 11 | 11 | 12 | 18 | 14 | 13 | 13 |
| f54(x) = 2 · sin(x) − 1 | 0.1 | π/3 | 48 | 16 | 9 | 8 | 12 | 12 | 8 | 10 | 11 |
| f55(x) = (x − 1) · exp(−x) | 0.0 | 1.5 | 49 | 70 | 13 | 10 | 12 | 4 | 11 | 10 | 10 |
| f56(x) = (x − 1)3 − 1 | 1.5 | 3 | 48 | 57 | 13 | 10 | 11 | 14 | 11 | 11 | 11 |
| f57(x) = exp(x2 + 7x − 30) − 1 | 2.6 | 3.5 | 47 | 202 | 21 | 31 | 50 | 14 | 12 | 12 | 11 |
| f58(x) = atan(x) − 1 | 1.0 | 8 | 50 | 26 | 12 | 9 | 13 | 12 | 10 | 12 | 10 |
| f59(x) = exp(x) − 2x − 1 | 0.2 | 3 | 49 | 147 | 16 | 14 | 12 | 14 | 13 | 12 | 12 |
| f60(x) = exp(−x) − x − sin(x) | 0.0 | 2 | 50 | 15 | 9 | 8 | 11 | 16 | 8 | 9 | 9 |
| f61(x) = x2 − sin(x)2 − 1 | −1 | 2 | 49 | 33 | 13 | 13 | 13 | 18 | 11 | 12 | 13 |
| f62(x) = sin(x) − x/2 | π/2 | π | 48 | 32 | 10 | 8 | 10 | 14 | 9 | 10 | 10 |
| f63(x) = x · exp(x) − 1 | −1 | 1 | 49 | 30 | 12 | 10 | 12 | 10 | 10 | 11 | 11 |
| f64(x) = tan(x − 1/10) | −1 | 1 | 50 | 40 | 8 | 8 | 11 | 12 | 9 | 9 | 8 |
| f65(x) = sin(x) + 0.5 | −1 | 1 | 49 | 11 | 9 | 8 | 11 | 16 | 8 | 9 | 9 |
| f66(x) = 4x5 + x2 + 1 | −1 | 1 | 49 | 33 | 13 | 11 | 15 | 16 | 10 | 13 | 13 |
| f67(x) = x + x10 − 1 | −1 | 1 | 49 | 50 | 13 | 11 | 51 | 12 | 12 | 14 | 12 |
| f68(x) = πx − e | −1 | 1 | 49 | 15 | 10 | 8 | 11 | 10 | 8 | 9 | 9 |
| f69(x) = log(abs(x − 10/9)) | −1 | 1 | 50 | 64 | 13 | 9 | 10 | 12 | 10 | 10 | 10 |
| f70(x) = 1/3 + sign(x) · abs(x)1/3 + x3 | −1 | 1 | 50 | 13 | 13 | 11 | 16 | 16 | 11 | 12 | 17 |
| f71(x) = (x + 2/3)/(x + 101/100) | −1 | 1 | 49 | 202 | 16 | 7 | 51 | 16 | 13 | 10 | 8 |
| f72(x) = (x · 106 − 1)3 | −1 | 1 | 50 | 3 | 3 | 3 | 51 | 6 | 139 | 51 | 50 |
| f73(x) = exp(x) · (x · 106 − 1)3 | −1 | 1 | 50 | 202 | 95 | 114 | 51 | 6 | 141 | 51 | 50 |
| f74(x) = (x − 1/3)2 · atan(x − 1/3) | −1 | 1 | 50 | 202 | 93 | 112 | 51 | 82 | 142 | 51 | 50 |
| f75(x) = sign(3x − 1) · (1 − sqrt(1 − (3x − 1)2/81)) | −1 | 1 | 27 | 202 | 28 | 37 | 23 | 38 | 66 | 27 | 27 |
| f76(x) = if(x > (1 − 106)/106; (1 + 106)/106; −1) | −1 | 1 | 49 | 49 | 37 | 37 | 50 | 52 | 49 | 50 | 39 |
| f77(x) = if (x ≠ 1/21; 1/(21 x − 1); 0) | −1 | 1 | 50 | 14 | 95 | 95 | 51 | 66 | 53 | 51 | 50 |
| f78(x) = x2/4 + ceiling(x/2) − 0.5 | −1 | 1 | 50 | 50 | 56 | 55 | 50 | 40 | 51 | 51 | 9 |
| f79(x) = ceiling(10x − 1) + 0.5 | −1 | 1 | 50 | 48 | 52 | 52 | 47 | 38 | 47 | 15 | 14 |
| f80(x) = x + sin(x · 106)/10 + 10−3 | −1 | 1 | 50 | 24 | 22 | 22 | 25 | 26 | 21 | 25 | 25 |
| f81(x) = if (x > −1; 1 + sin(1/(x + 1)); −1) | −1 | 1 | 49 | 52 | 15 | 14 | 51 | 40 | 51 | 20 | 14 |
| f82(x) = 202x − 2 · floor((2x + 10−2)/(2 · 10−2)) − 0.1 | −1 | 1 | 50 | 3 | 3 | 3 | 13 | 6 | 4 | 5 | 5 |
| f83(x) = (202x − 2 · floor((2x + 10−2)/(2 · 10−2)) − 0.1)3 | −1 | 1 | 50 | 202 | 73 | 70 | 51 | 70 | 125 | 51 | 50 |
| f84(x) = (x − 1) · (x − 2) · (x − 3) · (x − 4) · (x − 5) − 0.05 | 0.5 | 5.5 | 49 | 66 | 9 | 7 | 53 | 20 | 8 | 8 | 8 |
| f85(x) = sin(x) − 0.5x − 0.3 | −10.0 | 10.0 | 52 | 14 | 13 | 11 | 47 | 20 | 12 | 12 | 11 |
| f86(x) = exp(x) − 1 − x − x2/2 − 0.005 | −2.0 | 2.0 | 51 | 202 | 19 | 19 | 22 | 20 | 16 | 15 | 15 |
| f87(x) = 1/(x − 0.5) − 2 − 0.05 | 0.6 | 2.0 | 48 | 136 | 14 | 5 | 51 | 16 | 12 | 8 | 9 |
| f88(x) = log(x) − x + 2 − 0.05 | 0.1 | 3.0 | 50 | 29 | 13 | 11 | 17 | 16 | 13 | 14 | 14 |
| f89(x) = sin(20x) + 0.1 x − 0.1 | −4.0 | 5.0 | 51 | 17 | 17 | 15 | 17 | 20 | 17 | 16 | 13 |
| f90(x) = x3 − 2x2 + x − 0.025 | −1.0 | 2.0 | 51 | 175 | 13 | 13 | 52 | 18 | 15 | 13 | 13 |
| f91(x) = x · sin(1/x) − 0.1 − 0.01 | 0.01 | 1.0 | 49 | 13 | 13 | 11 | 39 | 14 | 13 | 13 | 13 |
| f92(x) = x3 − 0.001 | −10 | 10 | 53 | 202 | 24 | 202 | 55 | 28 | 24 | 42 | 25 |
| Total number of evaluations | 4410 | 8132 | 2907 | 3095 | 2798 | 2256 | 2880 | 1857 | 1741 | ||
| Average number of evaluations | 47.9 | 88.4 | 31.6 | 33.6 | 30.4 | 24.5 | 31.3 | 20.2 | 18.9 | ||
| Relative to modAB 2 | 2.53 | 4.67 | 1.67 | 1.78 | 1.61 | 1.30 | 1.65 | 1.07 | 1.00 | ||
| Maximal number of evaluations | 53 | 202 | 202 | 202 | 55 | 84 | 142 | 54 | 55 | ||
| Geometric mean | 46.3 | 52.0 | 19.2 | 17.5 | 23.9 | 19.1 | 18.3 | 15.9 | 15.0 | ||
| Best at (number of functions) | 13 | 8 | 10 | 52 | 6 | 5 | 22 | 12 | 38 | ||
| Worst at (number of functions) | 38 | 43 | 6 | 7 | 3 | 1 | 1 | 0 | 1 | ||
| Median | 49.0 | 48.5 | 13.0 | 11.0 | 22.0 | 16.0 | 12.0 | 13.0 | 12.0 | ||
| Standard deviation | 7.6 | 79.0 | 41.0 | 48.2 | 19.0 | 20.5 | 40.2 | 16.0 | 15.1 | ||
| Standard error | 0.80 | 8.23 | 4.27 | 5.03 | 1.98 | 2.13 | 4.19 | 1.67 | 1.58 | ||
| bs | fp | ill | AB | ITP | Rid | Bre | modAB 1 | modAB 2 | |||
| Algorithm | Mean | Error | StdDev | Relative |
|---|---|---|---|---|
| Bisection | 86.57 us | 0.832 us | 0.738 us | 1.75 |
| FalsePosition | 321.77 us | 3.561 us | 2.974 us | 6.51 |
| Illinois | 104.75 us | 1.353 us | 1.265 us | 2.12 |
| Anderson–Björck | 122.19 us | 1.205 us | 1.127 us | 2.47 |
| ITP | 193.37 us | 1.604 us | 1.339 us | 3.92 |
| Ridders | 66.61 us | 1.275 us | 1.309 us | 1.35 |
| Brent | 119.56 us | 1.213 us | 1.134 us | 2.42 |
| modAB 1 | 51.58 us | 1.013 us | 1.352 us | 1.04 |
| modAB 2 | 49.39 us | 0.323 us | 0.269 us | 1.00 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Ganchovski, N.; Smith, O.; Rackauckas, C.; Tomov, L.; Traykov, A. Improvements to the Modified Anderson–Björck (modAB) Root-Finding Algorithm. Algorithms 2026, 19, 332. https://doi.org/10.3390/a19050332
Ganchovski N, Smith O, Rackauckas C, Tomov L, Traykov A. Improvements to the Modified Anderson–Björck (modAB) Root-Finding Algorithm. Algorithms. 2026; 19(5):332. https://doi.org/10.3390/a19050332
Chicago/Turabian StyleGanchovski, Nedelcho, Oscar Smith, Christopher Rackauckas, Lachezar Tomov, and Alexander Traykov. 2026. "Improvements to the Modified Anderson–Björck (modAB) Root-Finding Algorithm" Algorithms 19, no. 5: 332. https://doi.org/10.3390/a19050332
APA StyleGanchovski, N., Smith, O., Rackauckas, C., Tomov, L., & Traykov, A. (2026). Improvements to the Modified Anderson–Björck (modAB) Root-Finding Algorithm. Algorithms, 19(5), 332. https://doi.org/10.3390/a19050332

