A in the method (extrapolate='steps', default 'none' = published bit for bit): NOT accepted into the proposed rule by the declared stop rule - X2 fails. Proposed rule without -> with A: APS 2806 -> 2967 (X2 FAIL), CHA 3220 -> 2925 (X1 pass), flat fun3-6 1823 -> 1524 (X4 pass), guarantee intact, 0 violations in 39 family cells (X3 pass). The per-problem edge over Chandrupatla on APS is lost (87/24/42, p=9e-5 -> 42/62/49, p=0.53).

X5: dissimilar+slope with A reaches 2859+2545 = 5404 over both sets, the best total this line has measured (was 5511; Chandrupatla 5228) - but again by trading the canonical set (2726 -> 2859) for the wide brackets (2785 -> 2545). The one-step replay (APS no harm) did not carry over: its bracket-halving metric rewards overshooting the root, which on a simple root costs superlinear convergence in the full run - the declared one-step limitation, now measured. Among the nine functions A helps only the tent (6026 -> 5892) and slightly ratio_soft.

Also: pin 'strictly fewer evaluations on every flat problem' was wrong for 6(x-2)^5 on [0,10] - both runs are budget-bound (90 of the guaranteed 91); corrected to the measured claim. verify_article 286/286, 836 tests pass twice.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
vvs
2026-09-21 12:11:06 +01:00
co-authored by Claude Opus 5
parent a25cffad1d
commit 99be33a632
6 changed files with 293 additions and 9 deletions
+24 -1
View File
@@ -542,7 +542,8 @@ def _local_order(x2, f2, x1, f1, x0, f0):
def pure_root(f, a, b, xtol, maxfev, similarity="ratio", scale="derived",
guard="step", stats=None, budget_factor=2.0,
budget_extra=None, endowment=1.0, space="x", prestep="none",
points="recent", direction="distance", exponent="none"):
points="recent", direction="distance", exponent="none",
extrapolate="none"):
"""The pure similarity root finder.
similarity : key into PURE_SIMS
@@ -594,6 +595,8 @@ def pure_root(f, a, b, xtol, maxfev, similarity="ratio", scale="derived",
if scale not in ("derived", "derived3", "derived_rho", "derived3_rho",
"derived3_m", "derived3_cap", "start", "bracket", "far"):
raise ValueError(f"unknown scale {scale!r}")
if extrapolate not in ("none", "steps"):
raise ValueError(f"unknown extrapolate {extrapolate!r}")
if exponent not in EXPONENTS:
raise ValueError(f"unknown exponent {exponent!r}")
if exponent == "order" and scale not in ("derived3", "derived3_cap", "bracket", "far"):
@@ -863,6 +866,26 @@ def pure_root(f, a, b, xtol, maxfev, similarity="ratio", scale="derived",
step = _log_space_step(S, x, fx, far, slope, c_near, xtol)
if step is None:
step = (1.0 - S(z_now)) * (far - x)
if extrapolate == "steps":
# PREREG 2026-09-21 (A in the method). The similarity of THIS
# step to the previous displacement: two successive moves the
# same way, of similar length, mean the iterate creeps along a
# geometric series whose remainder is step*S/(1-S) - so the
# step is lengthened by 1/(1-S). On x^m under a Newton step
# S = 1 - 1/m and the factor is m, which lands on the root.
# At a simple root successive steps shrink superlinearly, S ->
# 0 and the step is untouched. Capped at the far end, the same
# bound the step itself has; no constant.
d_prev = x - x_prev
if (step != 0.0 and d_prev != 0.0
and (step > 0.0) == (d_prev > 0.0)):
s_steps = (min(abs(step), abs(d_prev))
/ max(abs(step), abs(d_prev)))
if s_steps < 1.0:
longer = step / (1.0 - s_steps)
reach = abs(far - x)
step = (longer if abs(longer) <= reach
else math.copysign(reach, step))
if stats is not None and "trace" in stats:
# DIAGNOSTIC HOOK, behaviour-neutral: records the state each
# step was taken from, so another model can be evaluated on the