"""The abstract within 250 words (revision): same claims and numbers, fewer words. python -u apply_abstract_250.py """ PATH = "article/sim_numerics.md" NEW = """We replace bisection's midpoint rule by a similarity rule — the step grows with how dissimilar $f(x)$ is to the target 0, under a similarity $S$ with $S(0)=1$ — and derive its contraction factor in closed form. The derivation fixes a base rule before any benchmark is consulted: with the tent similarity and a three-point divided-difference scale it is a Newton step of Muller's order 1.839, clipped to the bracket and projected onto a budget of twice bisection whose multiplier is its one numerical constant. On the 154 problems of Alefeld, Potra and Shi it is level with TOMS 748 and 1.5% behind Chandrupatla's method; on wide brackets it is clearly behind. The gap is a decision, when to give the model up, and we take it by analogy: at a flat root the dimensionless configuration of the last three points recurs under zoom, at a simple root it tends to a line, and the analogous pair gives the order that says whether and where to split. This decision layer, about ten discrete rules selected on two development sets, gives the method A′. On 240 problems fixed before its code was frozen it needs 3656 evaluations against 5717 for Chandrupatla, 5535 for ModAB and 4488 with Lagouanelle's multiplicity estimate in place of the analogy; the lead lies in multiple and fractional roots, present in two of the six families. With the multiplicity known, the classical transformation $\\operatorname{sign}(f)|f|^{1/m}$ is 2.4 to 6.8 times cheaper on multiple roots.""" src = open(PATH, encoding="utf8").read() head, rest = src.split("## Abstract\n\n", 1) old, tail = rest.split("\n\n---\n", 1) assert "Bisection places its next iterate" in old print("old", len(old.split()), "new", len(NEW.split())) assert len(NEW.split()) <= 250 open(PATH, "w", encoding="utf8").write(head + "## Abstract\n\n" + NEW + "\n\n---\n" + tail) print("abstract replaced")