vvsandClaude Opus 5 8830765454 §3.1 and Tables 2-3 of the canonical .md brought to current data (Valeri's request). §3.1 said the projection's doubling 'is not a tuning constant' and that zero slack 'behaves as bisection'; both are refuted by measurement (stage12 part 3, rerun as measure_budget_factor.py): the canonical total is 2806 for every multiplier >= 1.25, but the wide-bracket total moves monotonically, 2752 at 1.25 to 4006 at 4, and multiplier 1 costs 4817/2997, nowhere near bisection's 7530/3090. So the proposed safeguard is the EARNED projection (credit, C0 = 1 bit: bisection + 1 step, the cheapest endowment within that promise, 8395 -> 7658 -> 6588), as code and verifier had already fixed but no text said; the scheduled projection stays as the one-constant end of the trade. The text says openly that this choice was made after a question, and that it was not made for the numbers - on the canonical set it costs 762 more.
Tables 2-3 regenerated from sweep_full.json by tables_for_md.py with the verifier's own ranking: Chandrupatla's method, missing from both, is FIRST on the canonical set (2785) and second on the wide-bracket set (2423); the proposed rule is 29th (3568) and 10th (3020); Brent 2889/4099 (was 2890/4101). The abstract, §5 text, §5.1, §5.2 (timed configuration named), §7 (records 2527/2523 are under the scheduled projection: 2523 flat for every multiplier 1.25-4, 2527 becomes 2541 at 1.25; under credit the readings give far less, best constant-free total 6494 by 'defect'), §8.4, §8.11 and the conclusion now say so: parity with the tuned methods at the price of one constant, or a constant-free rule with a tighter guarantee that trails on the canonical set. verify_article.py: 279 checks, measured tables recomputed from fresh runs; 762 tests pass twice.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 08:03:21 +01:00

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

  1. Similarity normalised by the two bracket ends is regula falsi, identically.
  2. A faster-changing similarity is not better; what matters is the slope of 1 - S at zero matching the problem, and only the data supplies it.
  3. Prototype-pair aggregation with softmax over the whole memory loses to the simplest form: 0 wins / 6 ties / 147 losses against Brent on APS.
  4. "Our safeguard fires less often" — refuted: Brent discards 53% of its interpolations on the set it wins, 34% on the set it loses.
  5. "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.
  6. 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).
  7. Zero slack in the projection is degenerate: a worst case of exactly bisection demands a halving at every step, leaving the projection no freedom.
  8. 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.
S
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 Readme Apache-2.0
5.8 MiB
Languages
Python 87.7%
TeX 10.4%
Cython 1.3%
Shell 0.6%