Sign tests by product underflowed: FIXED everywhere (branch, not master - the paper is not yet updated). FA * fnew < 0.0 with FA ~ -1e-200, fnew ~ 1e-150 is -0.0 and '-0.0 < 0.0' is False, so on flat functions (x^19) the bracket update moved the wrong end, the root left the bracket and the run still reported convergence - the proposed rule returned 4.9e-9, bisection 3.5e-9, ITP 1.6e-8 with a claimed 1e-12 bracket; the 1e-6 harness scored them solved. Same defect in our bisection, false-position family, Ridders, Brent, ITP and twelve copies in stage scripts, simroot/sim.py and one test; all replaced by _opposite / _same_sign, pinned by test_sign_underflow.
Impact, every sweep regenerated: the paper's key configurations are unchanged to the evaluation (proposed 2806/3220, credit 3568/3020, Chandrupatla, TOMS 748, Brent, bisection); 46 stated numbers move (ITP CHA 2857 -> 2896, ITP oracle 2611 -> 2647, record CHA figures by 14-18, the grid means by ~1%) and one finding weakens: the measured-order exponent of section 7.1 was cheaper in 29 of 60 far cells and 7 of 7 safeguards; with the fix 12 of 61 and 6 of 7, and on the wide-bracket set it now loses in every safeguard and drops 5 problems. PREREG G1-G3 outcome on the fixed code: G2 (repeating step pattern, period from the data) PASSES Y1-Y4 and is ACCEPTED by the stop rule - proposed rule APS 2806 -> 2782 (below Chandrupatla's 2787), CHA 3220 -> 3169, both 6026 -> 5951, per problem vs Chandrupatla on APS 95/20/38 p = 8e-7. G1 fails Y1/Y2 (its Y3 miss was the sign bug), G3 fails Y2, A fails Y2. Regression 887 pass; the two red tests are the paper-number check (awaiting the paper update) and test_blend (fixed since, copy in stage16). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+21
-5
@@ -136,8 +136,9 @@ def label(spec):
|
||||
if len(spec) > 7 and spec[7] != "distance":
|
||||
tag = f"{tag}+dissim"
|
||||
if len(spec) > 9 and spec[9] != "none":
|
||||
# the pair (off, on) must be distinguishable in a results file
|
||||
tag = f"{tag}+ext"
|
||||
# every extrapolation mode must be distinguishable in a results file
|
||||
tag = f"{tag}+" + {"steps": "ext", "confirmed": "extC", "pattern": "extP",
|
||||
"steps+results": "extR"}[spec[9]]
|
||||
if len(spec) > 8 and spec[8] != "none":
|
||||
# the exponent must be visible in the label: (far, none) is false position and
|
||||
# (far, order) is the hypothesis, and a results file that cannot tell them apart
|
||||
@@ -218,6 +219,18 @@ def _preflight_extrap_mode():
|
||||
raise SystemExit("extrapolate preflight FAILED: refusing to report zeros")
|
||||
|
||||
|
||||
def build_grid_extrap2(smoke):
|
||||
"""PREREG_extrapolation_gates_2026-09-21: the same cells as build_grid_extrap, every
|
||||
one in all five modes (none, A, G1, G2, G3)."""
|
||||
for mode in ("confirmed", "pattern", "steps+results"):
|
||||
x, _n, ok = pure_root(lambda t: t - 1.0, 0.0, 3.0, 1e-10, 100, similarity="ratio",
|
||||
scale="derived3", guard="project", extrapolate=mode)
|
||||
if not (ok and abs(x - 1.0) < 1e-8):
|
||||
raise SystemExit(f"extrapolate={mode} preflight FAILED: refusing to report zeros")
|
||||
modes = ("none", "steps", "confirmed", "pattern", "steps+results")
|
||||
return [s[:9] + (m,) for s in build_grid_extrap(smoke) if s[9] == "none" for m in modes]
|
||||
|
||||
|
||||
def build_grid_extrap(smoke):
|
||||
"""PREREG 2026-09-21: step extrapolation (A) inside the method, every cell as a pair
|
||||
(none, steps). Tent with every reading and every guard; all nine functions without
|
||||
@@ -374,10 +387,12 @@ def main():
|
||||
ordermode = "--order" in sys.argv # slot 1: the similarity read BY PLACE
|
||||
decmode = "--decision" in sys.argv # slot 2: the reading in the DECISION place
|
||||
extmode = "--extrap" in sys.argv # A in the method: step extrapolation
|
||||
ext2mode = "--extrap2" in sys.argv # gates G1-G3 on the lengthening
|
||||
combomode = "--combo" in sys.argv # modes A and B together
|
||||
pointsmode = "--points" in sys.argv # mode A: triple by shape
|
||||
dirmode = "--direction" in sys.argv # mode B: far end by dissimilarity
|
||||
specs = (build_grid_extrap(smoke) if extmode else
|
||||
specs = (build_grid_extrap2(smoke) if ext2mode else
|
||||
build_grid_extrap(smoke) if extmode else
|
||||
build_grid_decision(smoke) if decmode else
|
||||
build_grid_order(smoke) if ordermode else
|
||||
build_grid_cap(smoke) if capmode else
|
||||
@@ -402,8 +417,9 @@ def main():
|
||||
|
||||
# the published sweep_full.json is what verify_article.py checks the paper
|
||||
# against, so the log grid never writes into it
|
||||
if extmode or decmode or ordermode or capmode or combomode or pointsmode or dirmode:
|
||||
base = ("sweep_extrap" if extmode else
|
||||
if ext2mode or extmode or decmode or ordermode or capmode or combomode or pointsmode or dirmode:
|
||||
base = ("sweep_extrap2" if ext2mode else
|
||||
"sweep_extrap" if extmode else
|
||||
"sweep_decision" if decmode else
|
||||
"sweep_order" if ordermode else
|
||||
"sweep_cap" if capmode else
|
||||
|
||||
Reference in New Issue
Block a user