862feaff86075e003973fd3e8bc0396595db8c68
Point 1. The base step's order is Muller's 1.839, not 2: the derivative of the parabola through
the last three points errs by f'''/6 (x_n - x_{n-1})(x_n - x_{n-2}) = O(e_{n-1} e_{n-2}).
order_high_precision.py (3000 digits, to 1e-2900): 1.840 on cos x - x, e^x - 2, x^3 - x - 2,
sin x - 1/2; 2.000 only on x^2 - 2; two-point 1.618. The double-precision medians (2.000, 1.94)
are removed from the text.
Point 3. Every protocol number is re-scored under the criterion of section 9 - a sign change
within 1e-6 or f(x) == 0. rescore_uniform.py re-runs all 2779 distinct configurations of the 25
protocol sweeps on APS and CHA (the runs did not keep x) -> sweep_uniform.json, same row format;
it reproduces the APS/CHA lines of Table 10 exactly (built-in check). verify_article.py,
audit_similarity_places.py and the gap diagnostics read the re-scored data; the multiplier and
endowment measurements score by the same criterion. Table 7 (two criteria side by side) is gone;
7.3 now explains why the criterion is a sign change. Consequences stated in the text: the base
rule 2634 / 2357 against Chandrupatla 2595 / 1505 (1.5% behind on APS, no longer "level"); A'
2259 / 1074 (12.9% and 28.6% below Chandrupatla); the defect reading 2351 is second to the
shape reading 2337, not the record; the remembered analogy is level with no regime (2633 vs
2634) under this criterion; Table 9a's range is 19% to 425%.
Point 8. report_sweep.head_to_head counts every problem, failures charged (it counted only the
problems both methods solved, which is why Table 8 rows summed to 153 and 40). Family-level
comparisons added (A' vs Chandrupatla 8/1/6 of 15 and 7/0/2 of 9 families, not significant), and
an independence paragraph in section 9.
Point 11. sweep_itp.py: ITP (recommended constants and per-problem oracle) on all six corpora ->
Table 10; behind A' on every corpus, 0 bound violations.
Points 7, 9, 10 and the internals: the 2x bound is ours, not the rivals' promise; the law
predicts the group order only; "outside the proven bracket" explained (narrowest bracket of all
observed signs); 7.4's fun1 paragraph corrected (five costs under safe; the unguarded numbers
belong to fun1.4, fun1.5 and to fun3.1, fun5.1 separately); Table 1's last cell; the corpus-4
composition and odd multiplicities stated, also in the abstract.
build_tex.py: pdflatex output decoded with errors="replace" (a UTF-8 character cut by TeX's log
wrap crashed the build). Table 10 column widths rebalanced.
Checks: verify_article on the server 500 OK / 0 BAD (467 existing with the new values, 33 new);
regression x2 on the server 1232 passed, 0 failed; PDF 28 pages, 0 errors, 0 undefined, 0 overfull.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
sim-numerics — similarity as a step rule for root finding
Artifact for the paper article/sim_numerics.tex. Every claim in the paper is
produced by one of the scripts below; nothing in the text is transcribed by
hand, and verify_article.py checks all 72 stated numbers against the run
data as part of the test suite.
Reproducing
python -m pytest tests/ -q # 490 tests
python sweep_full.py # the full grid, writes sweep_full.json
python verify_article.py # every paper number vs the data
Heavy runs go to a Linux machine (Python 3.12, run detached with a log,
setsid nohup ... > sweep.log 2>&1). Use one platform for all numbers: the
test functions call libm, whose last digit differs between Windows and Linux,
and the same SciPy version scores 2819 for TOMS 748 on Windows against 2820 on
Linux for the same set. The paper's numbers are the Linux ones.
Where each claim comes from
| Paper | Claim | Script |
|---|---|---|
| Prop. 1 | the two-point similarity step is regula falsi | tests/test_simroot.py::test_the_pure_two_point_similarity_step_is_regula_falsi_exactly |
| Prop. 2, Table 1 | contraction law, predicted 0.1716 vs measured 0.1716 | stage0c_why_pure_fails.py |
| Cor. 1 | a chosen similarity fails on 5–8 of 8 problems | stage0b_pure_similarity.py |
| Cor. 2 | faster similarity is not better (sqrt, cbrt) |
stage0d_derived_similarity.py |
| Cor. 3 | derived scale ⇒ the step is |f|/|f'| ⇒ superlinear | stage0d_derived_similarity.py, stage0e_guard_cost.py |
| §3 safeguards | bracket vs step vs both, and what each costs | stage2_guard_modes.py, stage3_bound_check.py |
| §3 order | 1.584 (2-point) vs 1.944 (3-point) | stage5_three_point.py |
| §3.1 | project vs replace; the guarantee costs nothing | stage6_projection.py |
| §3.1 | the projection invariant, instrumented per step | stage6b_invariant.py |
| §4 fairness | ITP is not handicapped; κ₁ and n₀ sweeps | stage2b_itp_fairness.py |
| Tables 2, 3 | the 154-configuration ranking on both sets | sweep_full.py → report_sweep.py |
| Table 4 | the law across the whole grid | sweep_full.py → report_sweep.py |
| §6 | approach vs endgame, order, boldness, step quality | stage4_why.py |
| §7.1 | the prototype-aggregation form loses 0/6/147 | bench_full.py (SIM.pair2d.*) |
| §7.2 | the 2× bound and high order are incompatible | stage5_three_point.py, tests/test_three_point.py |
| §7.4 | the symmetric ratio similarity degenerates | simroot/pure.py (PURE_SIMS["ratio"] docstring), stage0d |
Layout
simroot/pure.py the method: one similarity, one step rule, three guards
simroot/baselines.py bisection, 4 false-position variants, Ridders, Brent,
TOMS 748 (SciPy), ITP (own, validated against its theorem)
simroot/sim.py the prototype-aggregation form — a NEGATIVE result, kept
because the paper reports it
stage0*..stage5* the derivation, in the order it was actually established
bench_full.py 17 methods on both sets
sweep_full.py 9 similarities x 4 scales x 4 guards + 10 baselines
report_sweep.py reads sweep_full.json, produces the paper's tables
verify_article.py asserts the paper against the data (72 checks)
tests/ 490 tests; every bug found in audit is pinned here
Negative results, so they are not reopened
- Similarity normalised by the two bracket ends is regula falsi, identically.
- A faster-changing similarity is not better; what matters is the slope of
1 - Sat zero matching the problem, and only the data supplies it. - Prototype-pair aggregation with softmax over the whole memory loses to the simplest form: 0 wins / 6 ties / 147 losses against Brent on APS.
- "Our safeguard fires less often" — refuted: Brent discards 53% of its interpolations on the set it wins, 34% on the set it loses.
- "Our steps are bolder" — refuted: on Chandrupatla Brent is bolder (56.3% against 41.8%) and still loses. The mechanism is step quality: median bracket removed 0.275 against 0.058.
- Every safeguard that REPLACES the computed step with a midpoint destroys the
order: with the three-point scale, order falls from 1.94 to 1.00 and the APS
total from 2806 to 7260. Resolved by projecting the step onto the
admissible interval instead (
guard="project"), which costs nothing on APS (2806 either way) and gains on Chandrupatla (40/45 at 3220 against 35/45 at 4104 unguarded). - Zero slack in the projection is degenerate: a worst case of exactly bisection demands a halving at every step, leaving the projection no freedom.
- Writing the projection as a radius around the midpoint instead of a clamp loses the invariant to cancellation — a relative 8.9e-5 overshoot on eleven Chandrupatla problems.
Description
Guaranteed bracketing root finder: beats Brent, TOMS 748 and Chandrupatla on multiple roots. Python/Cython, reproducible benchmarks, Apache-2.0.
https://doi.org/10.5281/zenodo.22894336
bisectionbracketingbrent-methodchandrupatlacythonmultiple-rootsnonlinear-equationsnumerical-analysisnumerical-methodspythonreproducible-researchroot-findingscientific-computingtoms748
Readme
Apache-2.0
5.8 MiB
Languages
Python
87.7%
TeX
10.4%
Cython
1.3%
Shell
0.6%