2: 'pre-registered' -> 'recorded in advance'; Appendix D states the order is attested only by the author's git history. 3: Dekker, Illinois and false position exhaust the budget on aps.13.00 under either criterion (stalled where |f|<1e-62, no sign change within 1e-6) - hence unchanged totals. 4: exact-zero stops in Table 11 (CHA: Brent 15/20, Chandrupatla 4/20, A' 2/20; corpus 1: none, transformation still 3.4x cheaper). 5: Table 12, the multiplicity estimated during the run (A' ahead; the analogy order inside Chandrupatla closes 31-59% of the gap on multiple roots and pays on simple ones; Lagouanelle blind on side-alternating triples); 6.6, conclusion, future work. 6: Algorithms 1-2 - lo/hi, return on a stall, L_x/L_f and the empty memory, the step pattern as a formula, O(n^2). 7: Table 3's two bracket-scaled rows, dashes in Table 5, the abstract's last sentence (250 words). verify_revision2: 17 checks. Server: verify 544 OK / 0 BAD, regression x2 1238 passed, PDF 32 pages, 0 errors, 0 overfull. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
29 lines
1.6 KiB
Python
29 lines
1.6 KiB
Python
"""Revision 2 follow-up: the step-pattern comment of Algorithm 2 within 72 characters a line, and the
|
||
abstract back under 250 words (same claims).
|
||
|
||
python -u apply_revision2_fit.py
|
||
"""
|
||
PATH = "article/sim_numerics.md"
|
||
R = [
|
||
(""" # step pattern: q_j <- |d_j|/|d_(j-1)| over successive nonzero
|
||
# moves d (k of them); rho(u,v) <- min(u,v)/max(u,v); repeats iff
|
||
# max over p = 2..floor(k/2) of mean_j rho(q_j, q_(j-p)) > 1/2""",
|
||
""" # step pattern: q_j <- |d_j|/|d_(j-1)| over the
|
||
# successive nonzero moves d (k ratios);
|
||
# rho(u,v) <- min(u,v)/max(u,v); repeats iff
|
||
# max_{p=2..floor(k/2)} mean_j rho(q_j, q_(j-p)) > 1/2"""),
|
||
("The derivation fixes a base rule before any benchmark is consulted:", "It fixes, before any benchmark, a base rule:"),
|
||
("This decision layer, about ten discrete rules selected on two development sets, gives the method A′.",
|
||
"This decision layer — about ten discrete rules selected on two development sets — gives A′."),
|
||
("what A′ adds is an estimate of the order made without knowing it, within a guarantee of twice bisection.",
|
||
"A′ adds an estimate of the order, within a guarantee of twice bisection."),
|
||
]
|
||
src = open(PATH, encoding="utf8").read()
|
||
for o, n in R:
|
||
assert src.count(o) == 1, o[:60]
|
||
src = src.replace(o, n)
|
||
open(PATH, "w", encoding="utf8").write(src)
|
||
ab = src.split("## Abstract\n\n")[1].split("\n\n---\n")[0]
|
||
code = src.split("**Algorithm 2 (A′).**")[1].split("```")[1]
|
||
print(f"abstract {len(ab.split())} words; longest Algorithm 2 line {max(len(l) for l in code.split(chr(10)))}")
|