Article: ModAB added - Table 8 row (2914 / 2436 / 5350; A' 118/11/25 and 32/9/4), Table 10 column (totals, bound violations, A' vs ModAB per corpus), how it is run (authors' package pymodab 1.0.9, same stopping rule, counts agree with the package's own), the evidence paragraph (ahead on every corpus p <= 0.0013, the one test 3656 vs 5535 183/34, ModAB's own benchmark all 91: 1507 vs 1588, 9 bound violations), 8.6: ModAB's linearity check at the midpoint named as the precursor of our exit judgment, abstract, conclusion, introduction, future work (the comparison no longer missing), reference 20. verify_article: every ModAB number checked; server 467 OK, 0 BAD; regression x2 1226 passed, 0 failed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
vvs
2026-09-21 21:42:15 +01:00
co-authored by Claude Opus 5
parent 37c81b027a
commit f80aeb5d13
4 changed files with 185 additions and 16 deletions
+103
View File
@@ -0,0 +1,103 @@
"""ModAB in article/sim_numerics.md (PREREG_modab outcome, sweep_modab.json): Table 8 and
Table 10 rows, the protocol note, the evidence paragraph of section 9, the precursor of the
exit judgment in 8.6, the abstract, the conclusion, future work, the introduction and
reference 20. Exact anchors, each found exactly once, or nothing is written.
python -u apply_article_modab.py
"""
from __future__ import annotations
PATH = "article/sim_numerics.md"
REPL = [
# introduction
("an interpolate–truncate–project cycle in ITP [4].",
"an interpolate–truncate–project cycle in ITP [4], an Anderson–Björck step behind a linearity "
"check in ModAB [10, 20]."),
# Table 8
("| ITP, per-problem oracle | 3260 | 2647 | 5907 | A′ 126/7/20 | A′ 35/1/4 |",
"| ITP, per-problem oracle | 3260 | 2647 | 5907 | A′ 126/7/20 | A′ 35/1/4 |\n"
"| ModAB [10, 20] | 2914 | 2436 | 5350 | A′ 118/11/25 | A′ 32/9/4 |"),
# section 9: how ModAB is run
("Where roots are not known in closed form, and for uniformity on all six corpora,",
"ModAB, the most recent bracketing method we know of, is run from its authors' package "
"(`pymodab` 1.0.9, a wrapper of their C code) with the stopping rule of every other method — a "
"bracket no wider than $\\varepsilon_x$, the relative term at machine precision, no stopping on "
"$|f|$ — and counted by the same wrapper around $f$, whose count agrees with the package's own. "
"Where roots are not known in closed form, and for uniformity on all six corpora,"),
# Table 10
("| corpus | A′ | Chandrupatla | Brent | TOMS 748 | A′ vs Chandrupatla |\n|---|---|---|---|---|---|",
"| corpus | A′ | Chandrupatla | ModAB | Brent | TOMS 748 | A′ vs Chandrupatla | A′ vs ModAB |\n"
"|---|---|---|---|---|---|---|---|"),
("| APS (154) | **2259** (0) | 2595 (0) | 2707 (0) | 2636 (0) | 103/20/31, $p=3\\cdot10^{-10}$ |",
"| APS (154) | **2259** (0) | 2595 (0) | 2726 (0) | 2707 (0) | 2636 (0) | 103/20/31, $p=3\\cdot10^{-10}$ | 118/10/26 |"),
("| Chandrupatla (45) | **1074** (0) | 1505 (0) | 3238 (18) | 3088 (15) | 31/4/10, $p=0.001$ |",
"| Chandrupatla (45) | **1074** (0) | 1505 (0) | 1681 (0) | 3238 (18) | 3088 (15) | 31/4/10, $p=0.001$ | 34/4/7 |"),
("| new corpus 1 (206) | **3290** (0) | 3716 (0) | 6395 (38) | 5746 (22) | 108/33/65, $p=0.001$ |",
"| new corpus 1 (206) | **3290** (0) | 3716 (0) | 3809 (1) | 6395 (38) | 5746 (22) | 108/33/65, $p=0.001$ | 125/26/55 |"),
("| Roots.jl (78) | **1371** (0) | 1566 (0) | 2455 (11) | 2339 (9) | 44/14/20, $p=0.004$ |",
"| Roots.jl (78) | **1371** (0) | 1566 (0) | 1446 (0) | 2455 (11) | 2339 (9) | 44/14/20, $p=0.004$ | 47/11/20 |"),
("| applied + GSL (132) | 1382 (0) | 1382 (0) | 1503 (1) | 1756 (1) | 48/52/32, $p=0.09$ |",
"| applied + GSL (132) | 1382 (0) | 1382 (0) | 1460 (0) | 1503 (1) | 1756 (1) | 48/52/32, $p=0.09$ | 76/35/21 |"),
("| **corpus 4 (240), the one test** | **3656** (0) | 5717 (0) | 8267 (50) | 8084 (37) | **177/35/28, $p=10^{-27}$** |",
"| **corpus 4 (240), the one test** | **3656** (0) | 5717 (0) | 5535 (8) | 8267 (50) | 8084 (37) | **177/35/28, $p=10^{-27}$** | **183/23/34** |"),
("| all 855 | **13032** | 16481 | 24565 | 23649 | |",
"| all 855 | **13032** | 16481 | 16657 | 24565 | 23649 | | |"),
# the evidence paragraph
("**What the evidence supports, and what it does not.** Against Brent and TOMS 748 A′ is ahead on "
"every corpus, by 8% to 67% in total, and it keeps its bound on all 855 problems, which Brent breaks "
"on 118 and TOMS 748 on 84.",
"**What the evidence supports, and what it does not.** Against Brent and TOMS 748 A′ is ahead on "
"every corpus, by 8% to 67% in total, and it keeps its bound on all 855 problems, which Brent breaks "
"on 118 and TOMS 748 on 84. Against ModAB it is ahead on every corpus, in total and problem by "
"problem ($p\\le0.0013$), on the one test of corpus 4 by 3656 to 5535 and 183 problems to 34 "
"($p=7\\cdot10^{-26}$), and on ModAB's own benchmark as well — all 91 problems of it, 1507 against "
"1588, 56/13/22 ($p=1.5\\cdot10^{-4}$); ModAB breaks the bound on 9 problems."),
# 8.6 table: the exit judgment's precursor
("| the tolerance step | Dekker [9], Brent [2] — borrowed and named as such |",
"| the tolerance step | Dekker [9], Brent [2] — borrowed and named as such |\n"
"| the exit judgment of §8.2 (the value at a split against the line) | ModAB's linearity check at "
"the midpoint [10, 20], $|y_m-y_3|<k\\,(|y_3|+|y_m|)$ with $k$ from a symmetry factor; ours compares "
"two predictions, the line and 0, without a factor |"),
# abstract
("Over 855 problems in six corpora it is ahead of Brent and TOMS 748 everywhere and keeps its bound "
"where they break theirs on 118 and 84 problems;",
"Over 855 problems in six corpora it is ahead of Brent, TOMS 748 and the recent ModAB everywhere "
"and keeps its bound where they break theirs on 118, 84 and 9 problems;"),
# conclusion
("The claim the measurements support is a lead over Brent and TOMS 748 everywhere, with the "
"guarantee they do not keep,",
"The claim the measurements support is a lead over Brent, TOMS 748 and ModAB everywhere, with the "
"guarantee they do not keep,"),
# future work
("Three questions remain, all narrower than the one this section used to pose.",
"Two questions remain, both narrower than the one this section used to pose."),
(" The third is a comparison this paper does not make: the modified Anderson–Björck method of [10], "
"the most recent bracketing method we know of, is not among the rivals; its own benchmark is corpus "
"2 here, so the comparison is ready to be run under the rule every other one followed — "
"pre-registered, on a corpus not yet seen.",
""),
# reference 20
("*Appl. Math. Comput.*, vol. 190, pp. 686–698, 2007.",
"*Appl. Math. Comput.*, vol. 190, pp. 686–698, 2007.\n"
"20. N. Ganchovski, O. Smith, C. Rackauckas, L. Tomov and A. Traykov, \"Improvements to the "
"Modified Anderson–Björck (modAB) root-finding algorithm,\" *Algorithms*, vol. 19, 332, 2026; "
"package `pymodab` 1.0.9."),
]
def main():
with open(PATH, encoding="utf8") as fh:
text = fh.read()
for old, _new in REPL:
if text.count(old) != 1:
raise SystemExit(f"found {text.count(old)}x: {old[:90]}")
for old, new in REPL:
text = text.replace(old, new)
with open(PATH, "w", encoding="utf8") as fh:
fh.write(text)
print(f"ModAB written ({len(REPL)} edits)")
if __name__ == "__main__":
main()
+19 -16
View File
@@ -10,13 +10,13 @@ Bisection places the next iterate at the midpoint because it uses no information
The derivation fixes a *base rule* before any benchmark is consulted: a similarity whose approach to 1 is linear, the finest available data-derived scale, and a safeguard that projects the step onto the admissible interval rather than replacing it. It is, explicitly, a Newton step with a three-point divided-difference derivative, clipped to the bracket and projected onto the bisection budget. The similarity sets that step, and its form is decisive: with the tent the step is Newton's, with any of the other eight functions the same method costs from 12% to four times more. It carries a proven worst case of twice bisection plus one step and exactly one free constant, which we declare rather than argue away: the multiplier of that budget. On the 154 problems of Alefeld, Potra and Shi it needs 2806 evaluations of $f$ against 2820 for TOMS 748, 2889 for Brent and 2787 for Chandrupatla's method — level in total — and beats Chandrupatla problem by problem 87 to 42 (exact sign test $p=9\cdot10^{-5}$). On the 45 wide-bracket problems of Chandrupatla it beats Brent and TOMS 748 and loses to ITP and to Chandrupatla (3220 against 2896 and 2441). For every data-derived scale, the ranking of the nine similarity functions matches the derived law without exception. The derivation fixes a *base rule* before any benchmark is consulted: a similarity whose approach to 1 is linear, the finest available data-derived scale, and a safeguard that projects the step onto the admissible interval rather than replacing it. It is, explicitly, a Newton step with a three-point divided-difference derivative, clipped to the bracket and projected onto the bisection budget. The similarity sets that step, and its form is decisive: with the tent the step is Newton's, with any of the other eight functions the same method costs from 12% to four times more. It carries a proven worst case of twice bisection plus one step and exactly one free constant, which we declare rather than argue away: the multiplier of that budget. On the 154 problems of Alefeld, Potra and Shi it needs 2806 evaluations of $f$ against 2820 for TOMS 748, 2889 for Brent and 2787 for Chandrupatla's method — level in total — and beats Chandrupatla problem by problem 87 to 42 (exact sign test $p=9\cdot10^{-5}$). On the 45 wide-bracket problems of Chandrupatla it beats Brent and TOMS 748 and loses to ITP and to Chandrupatla (3220 against 2896 and 2441). For every data-derived scale, the ranking of the nine similarity functions matches the derived law without exception.
The wide-bracket gap turns out to be not the order of the model but a decision — when to give the model up — and the decision is a similarity after all, of an unfamiliar kind: the similarity of a run to its own past. A pure power is self-similar under zoom, so the dimensionless configuration of the last three points recurs, while at a simple root it tends to the linear prototype; the analogous pair yields the local order, $m=\ln L_f/\ln L_x$, and an exponential, self-similar by translation, is its limit $m=\infty$. Entering a halving regime when that analogy holds with $m\ge2$ — the condition under which a tangent step loses to a halving — splitting at the point the order predicts, and leaving when the split looks linear, together with four smaller readings of the same kind and one borrowed element, gives the method proposed here, A′. On the two sets it needs 2438 and 2005 evaluations against Chandrupatla's 2787 and 2441 and beats him problem by problem on both, 103 to 30 and 29 to 7. The chain of decisions that produced it was selected on those sets; tested once, after its code was frozen, on 240 problems from six new families, it needs 3656 evaluations against Chandrupatla's 5717 and wins 177 problems to 28. Over 855 problems in six corpora it is ahead of Brent and TOMS 748 everywhere and keeps its bound where they break theirs on 118 and 84 problems; against Chandrupatla it is ahead in total on five corpora and level on the sixth. The lead is large on multiple, fractional and nearly flat roots and a matter of per cent on simple ones. Several of the resulting mechanisms coincide with classical ones — Lagouanelle's multiplicity estimate, false position on $|f|^{1/m}$ — reached here from similarity and analogy and recognised afterwards; what we found no counterpart for is the decision layer, where every choice — when to give the model up, where to split, when to return — is a judgment of similarity or of analogy, and the similarity that sets the step, whose form is decisive (replacing it costs 12% to 315%). The wide-bracket gap turns out to be not the order of the model but a decision — when to give the model up — and the decision is a similarity after all, of an unfamiliar kind: the similarity of a run to its own past. A pure power is self-similar under zoom, so the dimensionless configuration of the last three points recurs, while at a simple root it tends to the linear prototype; the analogous pair yields the local order, $m=\ln L_f/\ln L_x$, and an exponential, self-similar by translation, is its limit $m=\infty$. Entering a halving regime when that analogy holds with $m\ge2$ — the condition under which a tangent step loses to a halving — splitting at the point the order predicts, and leaving when the split looks linear, together with four smaller readings of the same kind and one borrowed element, gives the method proposed here, A′. On the two sets it needs 2438 and 2005 evaluations against Chandrupatla's 2787 and 2441 and beats him problem by problem on both, 103 to 30 and 29 to 7. The chain of decisions that produced it was selected on those sets; tested once, after its code was frozen, on 240 problems from six new families, it needs 3656 evaluations against Chandrupatla's 5717 and wins 177 problems to 28. Over 855 problems in six corpora it is ahead of Brent, TOMS 748 and the recent ModAB everywhere and keeps its bound where they break theirs on 118, 84 and 9 problems; against Chandrupatla it is ahead in total on five corpora and level on the sixth. The lead is large on multiple, fractional and nearly flat roots and a matter of per cent on simple ones. Several of the resulting mechanisms coincide with classical ones — Lagouanelle's multiplicity estimate, false position on $|f|^{1/m}$ — reached here from similarity and analogy and recognised afterwards; what we found no counterpart for is the decision layer, where every choice — when to give the model up, where to split, when to return — is a judgment of similarity or of analogy, and the similarity that sets the step, whose form is decisive (replacing it costs 12% to 315%).
--- ---
## 1. Introduction ## 1. Introduction
A bracketing root finder must decide, at every step, where inside the bracket to evaluate next. Bisection answers "in the middle", which is the correct answer when nothing is known. Every improvement since has answered "where a local model of $f$ says the root is": a secant in false position, an inverse quadratic in Brent [2], a cubic in TOMS 748 [1], an interpolate–truncate–project cycle in ITP [4]. Each of those answers carries constants: Illinois halves the stale ordinate, Brent accepts an interpolation subject to three empirical inequalities, ITP is governed by $\kappa_1,\kappa_2,n_0$. A bracketing root finder must decide, at every step, where inside the bracket to evaluate next. Bisection answers "in the middle", which is the correct answer when nothing is known. Every improvement since has answered "where a local model of $f$ says the root is": a secant in false position, an inverse quadratic in Brent [2], a cubic in TOMS 748 [1], an interpolate–truncate–project cycle in ITP [4], an Anderson–Björck step behind a linearity check in ModAB [10, 20]. Each of those answers carries constants: Illinois halves the stale ordinate, Brent accepts an interpolation subject to three empirical inequalities, ITP is governed by $\kappa_1,\kappa_2,n_0$.
This paper asks a different question. Suppose the only thing available is a *similarity function* — a map $S$ from an outcome to $[0,1]$, where 1 means "identical to what was wanted" and 0 means "not similar at all", in the sense used for parameter-free control in [6]. Can a root finder be built out of $S$ alone, and how does it compare with methods built out of polynomial models and tuned constants? This paper asks a different question. Suppose the only thing available is a *similarity function* — a map $S$ from an outcome to $[0,1]$, where 1 means "identical to what was wanted" and 0 means "not similar at all", in the sense used for parameter-free control in [6]. Can a root finder be built out of $S$ alone, and how does it compare with methods built out of polynomial models and tuned constants?
@@ -468,6 +468,7 @@ The method this paper proposes, **A′**, is the base rule of §3 — tent simil
| TOMS 748 | 2820 | 4000 | 6820 | A′ 127/6/20 | A′ 38/2/0 | | TOMS 748 | 2820 | 4000 | 6820 | A′ 127/6/20 | A′ 38/2/0 |
| Brent | 2889 | 4115 | 7004 | A′ 118/17/18 | A′ 33/3/2 | | Brent | 2889 | 4115 | 7004 | A′ 118/17/18 | A′ 33/3/2 |
| ITP, per-problem oracle | 3260 | 2647 | 5907 | A′ 126/7/20 | A′ 35/1/4 | | ITP, per-problem oracle | 3260 | 2647 | 5907 | A′ 126/7/20 | A′ 35/1/4 |
| ModAB [10, 20] | 2914 | 2436 | 5350 | A′ 118/11/25 | A′ 32/9/4 |
A′ is 12.5% below Chandrupatla on the canonical set and 17.9% below on the wide-bracket set, and beats every rival problem by problem on both. On the wide-bracket families it is ahead on seven of nine, level on `fun7` (the scoring artefact of §7.3) and behind on `fun9`, 65 against 55. The earned-budget form keeps its constant-free guarantee of bisection plus one step and pays for it as in §3.1. A′ is 12.5% below Chandrupatla on the canonical set and 17.9% below on the wide-bracket set, and beats every rival problem by problem on both. On the wide-bracket families it is ahead on seven of nine, level on `fun7` (the scoring artefact of §7.3) and behind on `fun9`, 65 against 55. The earned-budget form keeps its constant-free guarantee of bisection plus one step and pays for it as in §3.1.
@@ -514,6 +515,7 @@ Several mechanisms of A′ coincide with classical ones, and the coincidence is
| the split (7) | false position on $\operatorname{sign}(f)|f|^{1/m}$ [16, 17] | | the split (7) | false position on $\operatorname{sign}(f)|f|^{1/m}$ [16, 17] |
| the half the step promises | a relative of Brent's acceptance condition [2] | | the half the step promises | a relative of Brent's acceptance condition [2] |
| the tolerance step | Dekker [9], Brent [2] — borrowed and named as such | | the tolerance step | Dekker [9], Brent [2] — borrowed and named as such |
| the exit judgment of §8.2 (the value at a split against the line) | ModAB's linearity check at the midpoint [10, 20], $|y_m-y_3|<k\,(|y_3|+|y_m|)$ with $k$ from a symmetry factor; ours compares two predictions, the line and 0, without a factor |
What we found no counterpart for, in the literature we could reach, is the part that carries the gain in Table 9: the *decision* layer. A bracketing method that recognises the regime in which its model has lost by the similarity of the run to its own past — the recurrence of a dimensionless configuration against the linear prototype — reads the order from the analogous pair itself, distinguishes similarity by scaling from similarity by translation, and leaves the regime by a similarity judgment at a point the model did not choose; and a step whose length is set by a similarity function whose form, measured, is decisive. The methods for multiple roots we found are single-point iterations without a bracket, with the multiplicity assumed, estimated from derivatives, or removed by a transformation ([17]; Roots.jl's `Order1B` and `Order2B` [12]); Chandrupatla takes the decision to halve by an empirical acceptance band [3]. What we found no counterpart for, in the literature we could reach, is the part that carries the gain in Table 9: the *decision* layer. A bracketing method that recognises the regime in which its model has lost by the similarity of the run to its own past — the recurrence of a dimensionless configuration against the linear prototype — reads the order from the analogous pair itself, distinguishes similarity by scaling from similarity by translation, and leaves the regime by a similarity judgment at a point the model did not choose; and a step whose length is set by a similarity function whose form, measured, is decisive. The methods for multiple roots we found are single-point iterations without a bracket, with the multiplicity assumed, estimated from derivatives, or removed by a transformation ([17]; Roots.jl's `Order1B` and `Order2B` [12]); Chandrupatla takes the decision to halve by an empirical acceptance band [3].
@@ -526,21 +528,21 @@ Every decision above was taken on the two sets of §4. Pre-registration protects
3. **Applied and GSL** — the 10 bracketed problems of the GNU Scientific Library's root-finding test suite [11] and 122 equations from physics and engineering on grids fixed beforehand: Kepler's equation (eccentricity up to 0.999), Colebrook–White, Lambert's W, Planck/Wien, van der Waals for CO₂ (including near-critical), internal rate of return, the finite square well. 3. **Applied and GSL** — the 10 bracketed problems of the GNU Scientific Library's root-finding test suite [11] and 122 equations from physics and engineering on grids fixed beforehand: Kepler's equation (eccentricity up to 0.999), Colebrook–White, Lambert's W, Planck/Wien, van der Waals for CO₂ (including near-critical), internal rate of return, the finite square well.
4. **Corpus 4** — 240 problems in six new families (seed 20260922): random polynomials with a simple root, polynomials with a multiple root, fractional powers $|x-r|^p$ with $p\sim U(0.15,0.95)$, sums of exponentials and sines, compositions $\tanh$, $\arctan$, $\log(1+q^2)$ of a cubic, and functions odd about the root. The code of A′ was committed *before* this corpus was run, and nothing was changed after. 4. **Corpus 4** — 240 problems in six new families (seed 20260922): random polynomials with a simple root, polynomials with a multiple root, fractional powers $|x-r|^p$ with $p\sim U(0.15,0.95)$, sums of exponentials and sines, compositions $\tanh$, $\arctan$, $\log(1+q^2)$ of a cubic, and functions odd about the root. The code of A′ was committed *before* this corpus was run, and nothing was changed after.
Where roots are not known in closed form, and for uniformity on all six corpora, a run is solved when $f$ changes sign within $10^{-6}$ of its answer; the $x$-tolerance, the budget and the charge for a failure are those of §4. ModAB, the most recent bracketing method we know of, is run from its authors' package (`pymodab` 1.0.9, a wrapper of their C code) with the stopping rule of every other method — a bracket no wider than $\varepsilon_x$, the relative term at machine precision, no stopping on $|f|$ — and counted by the same wrapper around $f$, whose count agrees with the package's own. Where roots are not known in closed form, and for uniformity on all six corpora, a run is solved when $f$ changes sign within $10^{-6}$ of its answer; the $x$-tolerance, the budget and the charge for a failure are those of §4.
**The history is part of the result.** The variant carried to corpora 1–3 was A′ without the tolerance step and the overshoot branch. It transferred to corpus 1 by every pre-registered criterion (total 10% below Chandrupatla, per problem 105/34/67, $p=0.005$), did *not* transfer to Roots.jl (total 6.5% below, but per problem 38/10/30, $p=0.4$) and lost on the applied corpus (14% above). The losses there were traced to two gaps of the base step — no closing of the bracket once the root is reached, and no recognition of roots of order below one — which became the last two readings of §8.4; they were developed on the seen corpora and tested once, on corpus 4. **The history is part of the result.** The variant carried to corpora 1–3 was A′ without the tolerance step and the overshoot branch. It transferred to corpus 1 by every pre-registered criterion (total 10% below Chandrupatla, per problem 105/34/67, $p=0.005$), did *not* transfer to Roots.jl (total 6.5% below, but per problem 38/10/30, $p=0.4$) and lost on the applied corpus (14% above). The losses there were traced to two gaps of the base step — no closing of the bracket once the root is reached, and no recognition of roots of order below one — which became the last two readings of §8.4; they were developed on the seen corpora and tested once, on corpus 4.
**Table 10.** A′ against the library rivals on all six corpora (uniform criterion). Totals; in brackets the runs that break the $2\times$-bisection bound. Per problem against Chandrupatla: wins/ties/losses. **Table 10.** A′ against the library rivals on all six corpora (uniform criterion). Totals; in brackets the runs that break the $2\times$-bisection bound. Per problem against Chandrupatla: wins/ties/losses.
| corpus | A′ | Chandrupatla | Brent | TOMS 748 | A′ vs Chandrupatla | | corpus | A′ | Chandrupatla | ModAB | Brent | TOMS 748 | A′ vs Chandrupatla | A′ vs ModAB |
|---|---|---|---|---|---| |---|---|---|---|---|---|---|---|
| APS (154) | **2259** (0) | 2595 (0) | 2707 (0) | 2636 (0) | 103/20/31, $p=3\cdot10^{-10}$ | | APS (154) | **2259** (0) | 2595 (0) | 2726 (0) | 2707 (0) | 2636 (0) | 103/20/31, $p=3\cdot10^{-10}$ | 118/10/26 |
| Chandrupatla (45) | **1074** (0) | 1505 (0) | 3238 (18) | 3088 (15) | 31/4/10, $p=0.001$ | | Chandrupatla (45) | **1074** (0) | 1505 (0) | 1681 (0) | 3238 (18) | 3088 (15) | 31/4/10, $p=0.001$ | 34/4/7 |
| new corpus 1 (206) | **3290** (0) | 3716 (0) | 6395 (38) | 5746 (22) | 108/33/65, $p=0.001$ | | new corpus 1 (206) | **3290** (0) | 3716 (0) | 3809 (1) | 6395 (38) | 5746 (22) | 108/33/65, $p=0.001$ | 125/26/55 |
| Roots.jl (78) | **1371** (0) | 1566 (0) | 2455 (11) | 2339 (9) | 44/14/20, $p=0.004$ | | Roots.jl (78) | **1371** (0) | 1566 (0) | 1446 (0) | 2455 (11) | 2339 (9) | 44/14/20, $p=0.004$ | 47/11/20 |
| applied + GSL (132) | 1382 (0) | 1382 (0) | 1503 (1) | 1756 (1) | 48/52/32, $p=0.09$ | | applied + GSL (132) | 1382 (0) | 1382 (0) | 1460 (0) | 1503 (1) | 1756 (1) | 48/52/32, $p=0.09$ | 76/35/21 |
| **corpus 4 (240), the one test** | **3656** (0) | 5717 (0) | 8267 (50) | 8084 (37) | **177/35/28, $p=10^{-27}$** | | **corpus 4 (240), the one test** | **3656** (0) | 5717 (0) | 5535 (8) | 8267 (50) | 8084 (37) | **177/35/28, $p=10^{-27}$** | **183/23/34** |
| all 855 | **13032** | 16481 | 24565 | 23649 | | | all 855 | **13032** | 16481 | 16657 | 24565 | 23649 | | |
Only the last line of corpora is evidence for A′ in the strict sense; the first five were seen while it was developed and are reported as a description. On corpus 4 A′ is 36% below Chandrupatla and wins 177 problems to 28. Without the two classes aimed at by the last two readings it is 2403 against 3569, per problem 107/31/22 ($p=10^{-14}$); on the simple-root classes alone, 737 against 747 (−1.3%), per problem 43/22/15 ($p=3\cdot10^{-4}$). Only the last line of corpora is evidence for A′ in the strict sense; the first five were seen while it was developed and are reported as a description. On corpus 4 A′ is 36% below Chandrupatla and wins 177 problems to 28. Without the two classes aimed at by the last two readings it is 2403 against 3569, per problem 107/31/22 ($p=10^{-14}$); on the simple-root classes alone, 737 against 747 (−1.3%), per problem 43/22/15 ($p=3\cdot10^{-4}$).
@@ -555,7 +557,7 @@ Only the last line of corpora is evidence for A′ in the strict sense; the firs
| $\tanh$, $\arctan$, $\log(1+q^2)$ of a cubic | 503 | 1017 | 25/8/7 | | $\tanh$, $\arctan$, $\log(1+q^2)$ of a cubic | 503 | 1017 | 25/8/7 |
| odd about the root | 329 | 364 | 33/3/4 | | odd about the root | 329 | 364 | 33/3/4 |
**What the evidence supports, and what it does not.** Against Brent and TOMS 748 A′ is ahead on every corpus, by 8% to 67% in total, and it keeps its bound on all 855 problems, which Brent breaks on 118 and TOMS 748 on 84. Against Chandrupatla it is ahead in total on five corpora and level on the sixth, and ahead problem by problem on all six, significantly on five. The size of the lead is not uniform: it is large on multiple, fractional and nearly flat roots — the regime §8 recognises — and small on simple roots, where it is a matter of per cent. Where it is behind is named: `fun9` (65 against 55), the near-cancelling class of corpus 1 (491 against 391), random polynomials with a simple root in total (433 against 419, though ahead 20 to 12 in problems), and the smooth equations of the applied corpus, where the two are level. **What the evidence supports, and what it does not.** Against Brent and TOMS 748 A′ is ahead on every corpus, by 8% to 67% in total, and it keeps its bound on all 855 problems, which Brent breaks on 118 and TOMS 748 on 84. Against ModAB it is ahead on every corpus, in total and problem by problem ($p\le0.0013$), on the one test of corpus 4 by 3656 to 5535 and 183 problems to 34 ($p=7\cdot10^{-26}$), and on ModAB's own benchmark as well — all 91 problems of it, 1507 against 1588, 56/13/22 ($p=1.5\cdot10^{-4}$); ModAB breaks the bound on 9 problems. Against Chandrupatla it is ahead in total on five corpora and level on the sixth, and ahead problem by problem on all six, significantly on five. The size of the lead is not uniform: it is large on multiple, fractional and nearly flat roots — the regime §8 recognises — and small on simple roots, where it is a matter of per cent. Where it is behind is named: `fun9` (65 against 55), the near-cancelling class of corpus 1 (491 against 391), random polynomials with a simple root in total (433 against 419, though ahead 20 to 12 in problems), and the smooth equations of the applied corpus, where the two are level.
--- ---
@@ -601,15 +603,15 @@ A root finder can be derived from a similarity function alone, and the derivatio
The base rule has one declared constant and carries a worst case of twice bisection plus one step. On the canonical Alefeld–Potra–Shi set it is level with TOMS 748 and with Chandrupatla's method in total and ahead of both problem by problem; on the wide-bracket set Chandrupatla is genuinely stronger (2441 against 3220). §7.4 locates the cause: not the order of the model but the decision to give it up, which Chandrupatla takes by halving and which no reading of a single state takes correctly for our step. The base rule has one declared constant and carries a worst case of twice bisection plus one step. On the canonical Alefeld–Potra–Shi set it is level with TOMS 748 and with Chandrupatla's method in total and ahead of both problem by problem; on the wide-bracket set Chandrupatla is genuinely stronger (2441 against 3220). §7.4 locates the cause: not the order of the model but the decision to give it up, which Chandrupatla takes by halving and which no reading of a single state takes correctly for our step.
That decision is a similarity too — of the run to its own past. A pure power repeats its configuration under zoom, an exponential under translation, a simple root tends to the line; the analogous pair reads the local order, the order decides between the model and a halving by bisection's own $\tfrac12$, and it says where to split. The method built on it, A′, is ahead of Chandrupatla on both canonical sets in total and problem by problem, and on a corpus fixed after its code was frozen it needs 36% fewer evaluations and wins 177 problems to 28. The claim the measurements support is a lead over Brent and TOMS 748 everywhere, with the guarantee they do not keep, and over Chandrupatla a lead that is large where roots are multiple, fractional or nearly flat and small where they are simple — not superiority by the same margin everywhere. `fun9`, near-cancelling terms and smooth applied equations are where it is behind or level. That decision is a similarity too — of the run to its own past. A pure power repeats its configuration under zoom, an exponential under translation, a simple root tends to the line; the analogous pair reads the local order, the order decides between the model and a halving by bisection's own $\tfrac12$, and it says where to split. The method built on it, A′, is ahead of Chandrupatla on both canonical sets in total and problem by problem, and on a corpus fixed after its code was frozen it needs 36% fewer evaluations and wins 177 problems to 28. The claim the measurements support is a lead over Brent, TOMS 748 and ModAB everywhere, with the guarantee they do not keep, and over Chandrupatla a lead that is large where roots are multiple, fractional or nearly flat and small where they are simple — not superiority by the same margin everywhere. `fun9`, near-cancelling terms and smooth applied equations are where it is behind or level.
This is the same movement as in parameter-free similarity control [6], where membership functions are eliminated by normalising the input space from the data rather than by choosing widths. Here the object normalised is the value axis, and the price of choosing it by hand is measured rather than asserted. This is the same movement as in parameter-free similarity control [6], where membership functions are eliminated by normalising the input space from the data rather than by choosing widths. Here the object normalised is the value axis, and the price of choosing it by hand is measured rather than asserted.
### Future work ### Future work
Three questions remain, all narrower than the one this section used to pose. Two questions remain, both narrower than the one this section used to pose.
The first is the steep flank. Where the loss remains — `fun9`, the near-cancelling class, 4 − tan x at its pole — the base step approaches along a flank far steeper than its model, and the half contradiction of §8.4 removes only part of the cost. The second is the one geometric choice of §8.2, the Euclidean metric of the $(\xi,\varphi)$ plane: a metric derived from the configuration's own sensitivity would remove it. The third is a comparison this paper does not make: the modified Anderson–Björck method of [10], the most recent bracketing method we know of, is not among the rivals; its own benchmark is corpus 2 here, so the comparison is ready to be run under the rule every other one followed — pre-registered, on a corpus not yet seen. The first is the steep flank. Where the loss remains — `fun9`, the near-cancelling class, 4 − tan x at its pole — the base step approaches along a flank far steeper than its model, and the half contradiction of §8.4 removes only part of the cost. The second is the one geometric choice of §8.2, the Euclidean metric of the $(\xi,\varphi)$ plane: a metric derived from the configuration's own sensitivity would remove it.
--- ---
@@ -635,3 +637,4 @@ The first is the steep flank. Where the loss remains — `fun9`, the near-cancel
17. J. F. Traub, *Iterative Methods for the Solution of Equations*. Englewood Cliffs, NJ: Prentice-Hall, 1964. 17. J. F. Traub, *Iterative Methods for the Solution of Equations*. Englewood Cliffs, NJ: Prentice-Hall, 1964.
18. S. Weerakoon and T. G. I. Fernando, "A variant of Newton's method with accelerated third-order convergence," *Appl. Math. Lett.*, vol. 13, pp. 87–93, 2000. 18. S. Weerakoon and T. G. I. Fernando, "A variant of Newton's method with accelerated third-order convergence," *Appl. Math. Lett.*, vol. 13, pp. 87–93, 2000.
19. A. Cordero and J. R. Torregrosa, "Variants of Newton's method using fifth-order quadrature formulas," *Appl. Math. Comput.*, vol. 190, pp. 686–698, 2007. 19. A. Cordero and J. R. Torregrosa, "Variants of Newton's method using fifth-order quadrature formulas," *Appl. Math. Comput.*, vol. 190, pp. 686–698, 2007.
20. N. Ganchovski, O. Smith, C. Rackauckas, L. Tomov and A. Traykov, "Improvements to the Modified Anderson–Björck (modAB) root-finding algorithm," *Algorithms*, vol. 19, 332, 2026; package `pymodab` 1.0.9.
+23
View File
@@ -440,6 +440,29 @@ Section 9 (out-of-sample corpora):
OK Roots.jl, variant carried: per problem got (38, 10, 30) want (38, 10, 30) OK Roots.jl, variant carried: per problem got (38, 10, 30) want (38, 10, 30)
OK applied, variant carried: totals got (1580, 1382) want (1580, 1382) OK applied, variant carried: totals got (1580, 1382) want (1580, 1382)
ModAB (sweep_modab.json, the authors' package):
OK ModAB protocol APS, CHA, both got (2914, 2436, 5350) want (2914, 2436, 5350)
OK A' vs ModAB protocol APS got (118, 11, 25) want (118, 11, 25)
OK A' vs ModAB protocol CHA got (32, 9, 4) want (32, 9, 4)
OK Table 10 ModAB APS got (2726, 0) want (2726, 0)
OK Table 10 A' vs ModAB APS got (118, 10, 26) want (118, 10, 26)
OK Table 10 ModAB CHA got (1681, 0) want (1681, 0)
OK Table 10 A' vs ModAB CHA got (34, 4, 7) want (34, 4, 7)
OK Table 10 ModAB NEW got (3809, 1) want (3809, 1)
OK Table 10 A' vs ModAB NEW got (125, 26, 55) want (125, 26, 55)
OK Table 10 ModAB RJL got (1446, 0) want (1446, 0)
OK Table 10 A' vs ModAB RJL got (47, 11, 20) want (47, 11, 20)
OK Table 10 ModAB APP got (1460, 0) want (1460, 0)
OK Table 10 A' vs ModAB APP got (76, 35, 21) want (76, 35, 21)
OK Table 10 ModAB D got (5535, 8) want (5535, 8)
OK Table 10 A' vs ModAB D got (183, 23, 34) want (183, 23, 34)
OK A' vs ModAB: every corpus p <= 0.0013 got True want True
OK ModAB over all 855 got 16657 want 16657
OK ModAB violations over 855 got 9 want 9
OK corpus 4 A' vs ModAB p (1 digit) got '7e-26' want '7e-26'
OK ModAB's own benchmark, all 91 got (91, 1507, 1588, (56, 13, 22)) want (91, 1507, 1588, (56, 13, 22))
OK ModAB's own benchmark p (2 digits) got '0.00015' want '0.00015'
Table 9a and section 7: the similarity in the step (fresh audit run): Table 9a and section 7: the similarity in the step (fresh audit run):
OK Table 9a ratio APS+CHA got 4443 want 4443 OK Table 9a ratio APS+CHA got 4443 want 4443
OK Table 9a ratio six corpora got 13032 want 13032 OK Table 9a ratio six corpora got 13032 want 13032
+40
View File
@@ -800,6 +800,46 @@ def verify_flat_regime_and_oos():
check("applied, variant carried: totals", (sum(cost(v) for v in app["A"].values()), check("applied, variant carried: totals", (sum(cost(v) for v in app["A"].values()),
sum(cost(v) for v in app["chandrupatla"].values())), sum(cost(v) for v in app["chandrupatla"].values())),
(1580, 1382)) (1580, 1382))
print("\nModAB (sweep_modab.json, the authors' package):")
mb = _load("sweep_modab.json")
mp = mb["protocol"]["modab"]
check("ModAB protocol APS, CHA, both", (mp["APS"]["total"], mp["CHA"]["total"],
mp["APS"]["total"] + mp["CHA"]["total"]),
(2914, 2436, 5350))
for setname, want in (("APS", (118, 11, 25)), ("CHA", (32, 9, 4))):
am = {p: v for p, v in a[setname]["per"].items()}
mm = mp[setname]["per"]
w = sum(cost(am[p]) < cost(mm[p]) for p in am)
l = sum(cost(am[p]) > cost(mm[p]) for p in am)
check(f"A' vs ModAB protocol {setname}", (w, len(am) - w - l, l), want)
md = dict(mb["seen"]["modab"])
md.update(mb["fourth"]["modab"])
worst_p = 0.0
for s, (tm, vm, wtl) in {"APS": (2726, 0, (118, 10, 26)), "CHA": (1681, 0, (34, 4, 7)),
"NEW": (3809, 1, (125, 26, 55)), "RJL": (1446, 0, (47, 11, 20)),
"APP": (1460, 0, (76, 35, 21)), "D": (5535, 8, (183, 23, 34))}.items():
m = md[s]
check(f"Table 10 ModAB {s}", (sum(cost(v) for v in m.values()),
sum(v[2] for v in m.values())), (tm, vm))
ps = list(seen["Aprime"][s])
w = sum(cost(seen["Aprime"][s][p]) < cost(m[p]) for p in ps)
l = sum(cost(seen["Aprime"][s][p]) > cost(m[p]) for p in ps)
check(f"Table 10 A' vs ModAB {s}", (w, len(ps) - w - l, l), wtl)
worst_p = max(worst_p, sign_p(w, l))
check("A' vs ModAB: every corpus p <= 0.0013", round(worst_p, 4) <= 0.0013, True)
check("ModAB over all 855", sum(sum(cost(v) for v in md[s].values()) for s in names), 16657)
check("ModAB violations over 855", sum(v[2] for s in names for v in md[s].values()), 9)
check("corpus 4 A' vs ModAB p (1 digit)", f"{sign_p(183, 34):.1g}", "7e-26")
rjm = mb["rjl"]
ps91 = list(rjm["Aprime"])
w = sum(cost(rjm["Aprime"][p]) < cost(rjm["modab"][p]) for p in ps91)
l = sum(cost(rjm["Aprime"][p]) > cost(rjm["modab"][p]) for p in ps91)
check("ModAB's own benchmark, all 91", (len(ps91), sum(cost(rjm["Aprime"][p]) for p in ps91),
sum(cost(rjm["modab"][p]) for p in ps91),
(w, len(ps91) - w - l, l)),
(91, 1507, 1588, (56, 13, 22)))
check("ModAB's own benchmark p (2 digits)", f"{sign_p(w, l):.2g}", "0.00015")
print("\nTable 9a and section 7: the similarity in the step (fresh audit run):") print("\nTable 9a and section 7: the similarity in the step (fresh audit run):")
aps_ = {r["spec"][1]: r for r in _load("sweep_aprime_s.json")} aps_ = {r["spec"][1]: r for r in _load("sweep_aprime_s.json")}
abs_ = _load("sweep_ablation_s.json") abs_ = _load("sweep_ablation_s.json")