Open release of A' under the Apache License 2.0: LICENSE (verbatim Apache-2.0 text), NOTICE, licence stated in the paper's availability section and in simbracket's metadata. The next method is not described anywhere in the tree or in the history reachable from this branch. README no longer names the server. PDF rebuilt from the text as it stands. Server: verify 548 OK / 0 BAD, regression x2 1239 passed, PDF 32 pages, 0 errors, 0 overfull.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
vvs
2026-09-22 09:40:25 +01:00
co-authored by Claude Opus 5
parent 1eb2c1664f
commit 5c0550a0de
6 changed files with 424 additions and 96 deletions
+202
View File
@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+8
View File
@@ -0,0 +1,8 @@
sim-numerics — Root Finding by Similarity and Analogy
Copyright 2026 Valeri Sitnikov
Licensed under the Apache License, Version 2.0 (see LICENSE).
This product includes the proposed bracketing method A′, its reference implementation (simroot),
the compiled library simbracket, the benchmark harness, the problem corpora and every results file
behind the paper.
+1 -1
View File
@@ -558,7 +558,7 @@ The second is the steep flank. Where the loss remains — `fun9`, the near-cance
## Code and data availability ## Code and data availability
Everything behind this paper is released with it: the reference implementation of the base rule and of A′ (`simroot/pure.py`); `simbracket`, a compiled library of A′ (Cython; wheels for Linux and Windows, Python 3.10 or later) whose results equal the reference bit for bit on all 868 problems of the six corpora; the corpora as code (`corpus_*.py`); every sweep script with its results file; the advance records with the commits of Appendix D; and `verify_article.py`, which recomputes or re-reads every number stated in this paper and is part of the test suite. All numbers come from one Linux machine (§4). Repository: ⟨repository URL⟩. Everything behind this paper is released with it: the reference implementation of the base rule and of A′ (`simroot/pure.py`); `simbracket`, a compiled library of A′ (Cython; wheels for Linux and Windows, Python 3.10 or later) whose results equal the reference bit for bit on all 868 problems of the six corpora; the corpora as code (`corpus_*.py`); every sweep script with its results file; the advance records with the commits of Appendix D; and `verify_article.py`, which recomputes or re-reads every number stated in this paper and is part of the test suite. All of it is released under the Apache License 2.0. All numbers come from one Linux machine (§4). Repository: ⟨repository URL⟩.
--- ---
Binary file not shown.
+212 -95
View File
@@ -88,27 +88,27 @@ a Data-Selected Decision Layer}
\maketitle \maketitle
\begin{abstract} \begin{abstract}
We replace bisection's midpoint rule by a similarity rule --- the step 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 grows with the dissimilarity of \(f(x)\) to 0 under a similarity \(S\)
similarity \(S\) with \(S(0)=1\) --- and derive its contraction factor --- and derive its contraction factor in closed form. It fixes, before
in closed form. The derivation fixes a base rule before any benchmark is any benchmark, a base rule: with the tent similarity and a three-point
consulted: with the tent similarity and a three-point divided-difference divided-difference scale it is a Newton step of Muller's order 1.839,
scale it is a Newton step of Muller's order 1.839, clipped to the clipped to the bracket and projected onto a budget of twice bisection
bracket and projected onto a budget of twice bisection whose multiplier whose multiplier is its one numerical constant. On the 154 problems of
is its one numerical constant. On the 154 problems of Alefeld, Potra and Alefeld, Potra and Shi it is level with TOMS 748 and 1.5\% behind
Shi it is level with TOMS 748 and 1.5\% behind Chandrupatla's method; on Chandrupatla's method; on wide brackets it is clearly behind. The gap is
wide brackets it is clearly behind. The gap is a decision, when to give a decision, when to give the model up, and we take it by analogy: at a
the model up, and we take it by analogy: at a flat root the flat root the dimensionless configuration of the last three points
dimensionless configuration of the last three points recurs under zoom, recurs under zoom, at a simple root it tends to a line, and the
at a simple root it tends to a line, and the analogous pair gives the analogous pair gives the order that says whether and where to split.
order that says whether and where to split. This decision layer, about This decision layer --- about ten discrete rules selected on two
ten discrete rules selected on two development sets, gives the method development sets --- gives A′. On 240 problems fixed before its code was
A′. On 240 problems fixed before its code was frozen it needs 3656 frozen it needs 3656 evaluations against 5717 for Chandrupatla, 5535 for
evaluations against 5717 for Chandrupatla, 5535 for ModAB and 4488 with ModAB and 4488 with Lagouanelle's multiplicity estimate in place of the
Lagouanelle's multiplicity estimate in place of the analogy; the lead analogy; the lead lies in multiple and fractional roots, present in two
lies in multiple and fractional roots, present in two of the six of six families. With the multiplicity known, the transformation
families. With the multiplicity known, the classical transformation
\(\operatorname{sign}(f)|f|^{1/m}\) is 2.4 to 6.8 times cheaper on \(\operatorname{sign}(f)|f|^{1/m}\) is 2.4 to 6.8 times cheaper on
multiple roots. multiple roots; A′ adds an estimate of the order, within a guarantee of
twice bisection.
\end{abstract} \end{abstract}
\hypertarget{introduction}{% \hypertarget{introduction}{%
@@ -162,8 +162,8 @@ The paper makes four claims, each measured.
The search that produced these results --- readings of the similarity The search that produced these results --- readings of the similarity
that did not pay, the decomposition of the wide-bracket gap, wall-clock that did not pay, the decomposition of the wide-bracket gap, wall-clock
time, and the rejected rules --- is reported in Appendices A--C. The time, and the rejected rules --- is reported in Appendices A--C. The
code, the corpora and the pre-registrations are released (Appendix D and code, the corpora and the documents that recorded each test before its
the availability statement). run are released (Appendix D and the availability statement).
\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center} \begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
@@ -400,8 +400,10 @@ while |B - A| > xtol:
if sigma is 0 or not finite: xn <- midpoint(A,B) if sigma is 0 or not finite: xn <- midpoint(A,B)
else: else:
xn <- x + min(1, |f(x)|/sigma) * (far - x) # the step, eq (4) xn <- x + min(1, |f(x)|/sigma) * (far - x) # the step, eq (4)
lo, hi <- min(A,B), max(A,B)
xn <- clamp(xn, hi - allow, lo + allow) # projection, eq (3) xn <- clamp(xn, hi - allow, lo + allow) # projection, eq (3)
if xn outside (A,B) or already evaluated: xn <- midpoint(A,B) if xn outside (A,B) or already evaluated: xn <- midpoint(A,B)
(if the midpoint too was evaluated: return it)
evaluate fn = f(xn); allow <- allow / 2 evaluate fn = f(xn); allow <- allow / 2
xp2, xp, x <- xp, x, xn xp2, xp, x <- xp, x, xn
update the bracket: whichever of A,B keeps the sign change update the bracket: whichever of A,B keeps the sign change
@@ -554,15 +556,17 @@ transcribed by hand.
it reports convergence and \(f\) changes sign within \(10^{-6}\) of the it reports convergence and \(f\) changes sign within \(10^{-6}\) of the
returned point, or vanishes there --- the bracketing notion of a root, returned point, or vanishes there --- the bracketing notion of a root,
the same criterion on every corpus of this paper; \(x\)-tolerance the same criterion on every corpus of this paper; \(x\)-tolerance
\(10^{-12}\); budget 200 evaluations. Scoring against the published root \(10^{-12}\); budget 200 evaluations. Every method, ours included, stops
instead, as the benchmarks' harness does, charges every method the full when its bracket is no wider than \(\varepsilon_x\) or when it evaluates
budget on six problems where \(f\) vanishes identically around the root an exact zero of the function it works on; none stops on a small
in floating point (§A.5). Head-to-head counts (wins/ties/losses) are \(|f|\). Scoring against the published root instead, as the benchmarks'
taken over every problem of a set with the same charging as the totals. harness does, charges every method the full budget on six problems where
\emph{Failures are charged the full budget}, so no method can buy a low \(f\) vanishes identically around the root in floating point (§A.5).
total by giving up early, and totals are reported over all problems Head-to-head counts (wins/ties/losses) are taken over every problem of a
rather than over the subset a method happened to solve. Rankings are by set with the same charging as the totals. \emph{Failures are charged the
failures first, then by total. full budget}, so no method can buy a low total by giving up early, and
totals are reported over all problems rather than over the subset a
method happened to solve. Rankings are by failures first, then by total.
\textbf{Competitors.} Where SciPy ships the method, the competitor is \textbf{Competitors.} Where SciPy ships the method, the competitor is
the library --- Chandrupatla is the library --- Chandrupatla is
@@ -655,7 +659,11 @@ its losses are the larger ones; by function family, the unit in which
these problems are independent (§7), the comparison is 6/1/8 of 15 these problems are independent (§7), the comparison is 6/1/8 of 15
families, a tie. The constant-free variant goes 79/3/72 against families, a tie. The constant-free variant goes 79/3/72 against
Chandrupatla (\(p=0.63\)), 78/9/67 against TOMS 748 and 79/5/70 against Chandrupatla (\(p=0.63\)), 78/9/67 against TOMS 748 and 79/5/70 against
Brent. Brent. Dekker, Illinois and false position fail \texttt{aps.13.00} under
either criterion and so keep their totals: they spend the whole budget
without converging, Dekker and Illinois stalled on one side of the zero
where \(|f|<10^{-62}\) but \(f\) does not change sign within
\(10^{-6}\).
\textbf{Table 3.} Chandrupatla, 45 problems, brackets up to \(10^{12}\) \textbf{Table 3.} Chandrupatla, 45 problems, brackets up to \(10^{12}\)
wide, out of 264 configurations. wide, out of 264 configurations.
@@ -689,7 +697,11 @@ total evals
2 & ITP, per-problem oracle & yes & 45/45 & 1675 & 0 \\ 2 & ITP, per-problem oracle & yes & 45/45 & 1675 & 0 \\
3 & similarity, \(e^{-\lvert z\rvert}\), bracket scale, both guards & no 3 & similarity, \(e^{-\lvert z\rvert}\), bracket scale, both guards & no
& 45/45 & 1778 & 0 \\ & 45/45 & 1778 & 0 \\
4 & similarity, \(e^{-\lvert z\rvert}\), bracket scale, bracket guard &
no & 45/45 & 1848 & 0 \\
5 & ITP, recommended constants & yes & 45/45 & 1946 & 0 \\ 5 & ITP, recommended constants & yes & 45/45 & 1946 & 0 \\
6 & similarity, \(e^{-\lvert z\rvert}\), bracket scale, earned
projection & no & 45/45 & 1952 & 0 \\
9 & constant-free variant: earned projection & no & 45/45 & 2073 & 0 \\ 9 & constant-free variant: earned projection & no & 45/45 & 2073 & 0 \\
15 & bisection & no & 45/45 & 2136 & 0 \\ 15 & bisection & no & 45/45 & 2136 & 0 \\
\textbf{49} & \textbf{base rule: tent, 3-point, projection (\(c=2\))} & \textbf{49} & \textbf{base rule: tent, 3-point, projection (\(c=2\))} &
@@ -774,8 +786,9 @@ the right move is to halve, Chandrupatla's method halves on up to all of
its steps, and no reading of a single state measured takes that decision its steps, and no reading of a single state measured takes that decision
correctly. This section takes it by a similarity of the run to \emph{its correctly. This section takes it by a similarity of the run to \emph{its
own past} --- an analogy in Pólya's sense {[}8{]}, two situations own past} --- an analogy in Pólya's sense {[}8{]}, two situations
agreeing in more than one relation. Every rule below was pre-registered agreeing in more than one relation. Every rule below was recorded, with
with a stop rule (Appendix D); the rejected ones are in Appendix C. its criteria and stop rule, before its code and run (Appendix D); the
rejected ones are in Appendix C.
\hypertarget{the-flag-a-promise-that-was-not-kept}{% \hypertarget{the-flag-a-promise-that-was-not-kept}{%
\subsubsection{6.1 The flag: a promise that was not \subsubsection{6.1 The flag: a promise that was not
@@ -964,7 +977,10 @@ among the many candidates of Appendix C. That selection is why the
method was tested once on a corpus fixed before its code was frozen, and method was tested once on a corpus fixed before its code was frozen, and
against simpler rules put in its place (§7). Algorithm 2 is the complete against simpler rules put in its place (§7). Algorithm 2 is the complete
method; \texttt{simroot/pure.py} and the compiled \texttt{simbracket} method; \texttt{simroot/pure.py} and the compiled \texttt{simbracket}
implement exactly this and agree bit for bit. implement exactly this and agree bit for bit. The nearest-configuration
search runs over the run's memory: \(O(n)\) per step, \(O(n^2)\) per run
of \(n\) evaluations (\(n\le200\) here), arithmetic that matters only
when \(f\) is cheap (Appendix B).
\textbf{Algorithm 2 (A′).} Notation of Algorithm 1; \textbf{Algorithm 2 (A′).} Notation of Algorithm 1;
\(S(z)=\max(0,1-|z|)\). \(S(z)=\max(0,1-|z|)\).
@@ -987,9 +1003,11 @@ while |B - A| > xtol:
# unkept promise, and unkept promise with a crossing # unkept promise, and unkept promise with a crossing
flag <- not in_regime and last_model and fx/fp >= 1/4 flag <- not in_regime and last_model and fx/fp >= 1/4
flag_over <- not in_regime and last_model and fx/fp <= -1/4 flag_over <- not in_regime and last_model and fx/fp <= -1/4
# order (6) of the analogous pair: the past configuration # order (6) of the analogous pair. q <- the configuration in
# nearest to c (Euclidean in (xi, phi)), if nearer than the # configs nearest to c (Euclidean in (xi, phi)); no m if c or
# line phi = xi; inf if the pair shows L_f < 1 <= L_x; else none # configs is empty or q is not nearer than the line phi = xi.
# L_x <- |x-xp| / q.dx, L_f <- |fx-fp| / q.df
# m <- inf if L_f < 1 <= L_x (translation), else ln L_f / ln L_x
m <- order of the analogous pair m <- order of the analogous pair
if m >= 2: analogy_seen <- true; m_a <- m if m >= 2: analogy_seen <- true; m_a <- m
if 0 < m <= 2/3: shallow_seen <- true; m_s <- m if 0 < m <= 2/3: shallow_seen <- true; m_s <- m
@@ -1003,18 +1021,20 @@ while |B - A| > xtol:
else: else:
step <- (1 - S(z)) * (far - x) # eq. (4) step <- (1 - S(z)) * (far - x) # eq. (4)
append x - xp to moves append x - xp to moves
# step pattern: the lag 2 .. half the history of highest # step pattern: q_j <- |d_j|/|d_(j-1)| over the
# mean similarity of successive length ratios has mean > 1/2, # successive nonzero moves d (k ratios);
# and step and x - xp point the same way # rho(u,v) <- min(u,v)/max(u,v); repeats iff
if the pattern repeats: # max_{p=2..floor(k/2)} mean_j rho(q_j, q_(j-p)) > 1/2
if repeats and step, x - xp point the same way:
s <- min(|step|,|x-xp|) / max(|step|,|x-xp|) s <- min(|step|,|x-xp|) / max(|step|,|x-xp|)
step <- step / (1 - s), at most |far - x| long step <- step / (1 - s), at most |far - x| long
if |step| < xtol/2 and last_model and |fx/fp| < 1/4: if |step| < xtol/2 and last_model and |fx/fp| < 1/4:
step <- sign(far - x) * xtol/2 # tolerance step step <- sign(far - x) * xtol/2 # tolerance step
xn <- x + step; model <- true xn <- x + step; model <- true
lo, hi <- min(A,B), max(A,B)
xn <- clamp(xn, hi - allow, lo + allow) # projection (3) xn <- clamp(xn, hi - allow, lo + allow) # projection (3)
if xn outside (A,B) or xn in {x, xp}: if xn outside (A,B) or xn in {x, xp}:
xn <- mid; if mid in {x, xp}: stop xn <- mid; if mid in {x, xp}: return mid
last_model <- model and xn is the model's own point last_model <- model and xn is the model's own point
fn <- f(xn) fn <- f(xn)
if in_regime: # exit if in_regime: # exit
@@ -1056,8 +1076,8 @@ A′ per problem, CHA
\endlastfoot \endlastfoot
\textbf{A′ (proposed)} & \textbf{2259} & \textbf{1074} & \textbf{3333} & \textbf{A′ (proposed)} & \textbf{2259} & \textbf{1074} & \textbf{3333} &
--- & --- \\ --- & --- \\
A′, earned budget (no free constant) & 3417 & 1852 & 5269 & & \\ A′, earned budget (no free constant) & 3417 & 1852 & 5269 & --- & --- \\
base rule (§3) & 2634 & 2357 & 4991 & & \\ base rule (§3) & 2634 & 2357 & 4991 & --- & --- \\
Chandrupatla & 2595 & 1505 & 4100 & 103/20/31, \(p=3\cdot10^{-10}\) & Chandrupatla & 2595 & 1505 & 4100 & 103/20/31, \(p=3\cdot10^{-10}\) &
31/4/10, \(p=0.001\) \\ 31/4/10, \(p=0.001\) \\
TOMS 748 & 2636 & 3088 & 5724 & 127/6/21 & 42/2/1 \\ TOMS 748 & 2636 & 3088 & 5724 & 127/6/21 & 42/2/1 \\
@@ -1126,8 +1146,8 @@ sign contradiction & +11 & −12 & +29 & 0 & +1 & −1 & +28 \\
Every component is positive in sum; the regime and the split carry the Every component is positive in sum; the regime and the split carry the
method. The step pattern (earns on two corpora of six) and the sign method. The step pattern (earns on two corpora of six) and the sign
contradiction (+28 over 855 problems) are marginal --- together under contradiction (+28 over 855 problems) are marginal --- together under
one per cent, 117 of 13032 evaluations --- and are kept because the one per cent, 117 of 13032 evaluations --- and are kept because the rule
pre-registered rule removes only a component that earns nowhere. recorded in advance removes only a component that earns nowhere.
\textbf{Table 7.} The similarity in the step of A′: the same method with \textbf{Table 7.} The similarity in the step of A′: the same method with
each of the nine similarity functions of §5.2 in place of the tent, each of the nine similarity functions of §5.2 in place of the tent,
@@ -1220,22 +1240,25 @@ Roots.jl's \texttt{Order1B} and \texttt{Order2B} {[}12{]}); inside a
bracket, {[}22{]} needs the multiplicity given and recognises a multiple bracket, {[}22{]} needs the multiplicity given and recognises a multiple
root only by the number of evaluations spent, against a third of root only by the number of evaluations spent, against a third of
bisection's; Chandrupatla takes the decision to halve by an empirical bisection's; Chandrupatla takes the decision to halve by an empirical
acceptance band {[}3{]}. §7.1 puts this claim against the detectors a acceptance band {[}3{]}. §7.1 tests this against the detectors a reader
reader would try first, and against the transformation with the would try first and against the classical transformation with the
multiplicity known in advance. multiplicity known or estimated, and the outcome is sharper than the
claim: the order read by analogy transfers to the classical frame and
works better there than in A′'s own split, while A′'s exit is what keeps
simple roots cheap.
\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center} \begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
\hypertarget{out-of-sample-evidence}{% \hypertarget{out-of-sample-evidence}{%
\subsection{7. Out-of-sample evidence}\label{out-of-sample-evidence}} \subsection{7. Out-of-sample evidence}\label{out-of-sample-evidence}}
Every decision above was taken on the two sets of §4. Pre-registration Every decision above was taken on the two sets of §4. Recording each
protects each decision but not the chain: the final configuration --- a decision in advance protects the decision but not the chain: the final
decision layer of about ten discrete rules, chosen among the many configuration --- a decision layer of about ten discrete rules, chosen
candidates listed in Appendix C --- was selected on the same 199 among the many candidates listed in Appendix C --- was selected on the
problems. Four further corpora were therefore used, each fixed and same 199 problems. Four further corpora were therefore used, each fixed
committed before any method was run on it, each with its criteria and and committed before any method was run on it, each with its criteria
stop rule written down first. and stop rule written down first.
\begin{enumerate} \begin{enumerate}
\def\labelenumi{\arabic{enumi}.} \def\labelenumi{\arabic{enumi}.}
@@ -1279,8 +1302,8 @@ counting of every other method. The criterion, tolerance, budget and
charging are those of §4. charging are those of §4.
The variant carried to corpora 1--3 was A′ without the tolerance step The variant carried to corpora 1--3 was A′ without the tolerance step
and the overshoot branch. It transferred to corpus 1 by every and the overshoot branch. It transferred to corpus 1 by every criterion
pre-registered criterion (per problem 105/34/67 against Chandrupatla, recorded in advance (per problem 105/34/67 against Chandrupatla,
\(p=0.005\)), did \emph{not} transfer to Roots.jl (38/10/30, \(p=0.4\)) \(p=0.005\)), did \emph{not} transfer to Roots.jl (38/10/30, \(p=0.4\))
and lost on the applied corpus; the two readings that closed those gaps and lost on the applied corpus; the two readings that closed those gaps
were developed on the seen corpora and tested once, on corpus 4. were developed on the seen corpora and tested once, on corpus 4.
@@ -1426,8 +1449,8 @@ advance}\label{controls-simpler-detectors-and-the-multiplicity-known-in-advance}
Two controls ask whether the gain of §6 comes from the recognition by Two controls ask whether the gain of §6 comes from the recognition by
analogy or only from the split (7) with any reasonable detector. Both analogy or only from the split (7) with any reasonable detector. Both
were pre-registered, with what the paper would say under every outcome, were recorded, with what the paper would say under every outcome, before
before the run (\texttt{sweep\_controls.py}). the run (\texttt{sweep\_controls.py}).
\textbf{Other detectors in A′.} A′ is run with only its detector \textbf{Other detectors in A′.} A′ is run with only its detector
swapped; the memory, the split, the exit and the five readings of §6.4 swapped; the memory, the split, the exit and the five readings of §6.4
@@ -1483,7 +1506,7 @@ none & 2693 & 2526 & 6165 & 20749 & 113/87/40 & \(3\cdot10^{-9}\) \\
\end{longtable} \end{longtable}
On corpus 4, the one test, A′ beats all three in total and problem by On corpus 4, the one test, A′ beats all three in total and problem by
problem, as the pre-registered criterion required. The competent problem, as the criterion recorded in advance required. The competent
alternative is Lagouanelle's estimate: it is slightly better on the alternative is Lagouanelle's estimate: it is slightly better on the
canonical set (2235 against 2259), and on corpus 4 A′'s lead over it canonical set (2235 against 2259), and on corpus 4 A′'s lead over it
lies in the multiple-root and fractional-power families (1163 against lies in the multiple-root and fractional-power families (1163 against
@@ -1538,15 +1561,102 @@ corpus 4 & 88 & 2159 & 901 & 844 & 4151 \\
\end{longtable} \end{longtable}
With the multiplicity known the transformation is 2.4 to 6.8 times With the multiplicity known the transformation is 2.4 to 6.8 times
cheaper than A′. A′ is far ahead of Chandrupatla on \(f\) itself, which cheaper than A′. Every method, A′ included, stops on an exact zero of
does not know the multiplicity either. On the remaining problems the the function it evaluates, and on the pure powers of the Chandrupatla
transformed and untransformed runs differ little and A′ is close to set \(g\) is exactly linear, so the secant lands on the root: 15 of
them: ahead on the canonical sets (2259 against 2640, 420 against 437 Brent's 20 runs and 4 of Chandrupatla's end that way there (A′: 2). On
for Chandrupatla on \(g\)), behind on corpora 1 and 4 (2061 against new corpus 1 no transformed run ends on a zero, and the transformation
1924, 1497 against 1427). So on multiple roots the contribution of A′ is is still 3.4 times cheaper. A′ is far ahead of Chandrupatla on \(f\)
the estimate of the order without knowing it, and the gap to Table 11 is itself, which does not know the multiplicity either. On the remaining
the price of that estimate --- large, and the clearest direction for problems the transformed and untransformed runs differ little and A′ is
improving the method. close to them: ahead on the canonical sets (2259 against 2640, 420
against 437 for Chandrupatla on \(g\)), behind on corpora 1 and 4 (2061
against 1924, 1497 against 1427). So on multiple roots the contribution
of A′ is the estimate of the order without knowing it, and the gap to
Table 11 is the price of that estimate --- large, and the clearest
direction for improving the method.
\textbf{The multiplicity estimated during the run.} Between A′ and the
oracle lies the natural classical method: Chandrupatla's interpolation
on \(g=\operatorname{sign}(f)|f|^{1/\hat m}\) with \(\hat m\) estimated
during the run. Our implementation of Chandrupatla's method (identical
to the library on all 199 problems, and to itself when
\(\hat m\equiv1\)) keeps the true \(f\) at its three points and reads
\(G(v)=\operatorname{sign}(v)|v|^{1/\hat m}\) only in the acceptance
band and the interpolation; \(\hat m\) starts at 1 and takes an order
read from the last three evaluations whenever that order lies on a
branch of §6.1 (\(m\ge2\) or \(0<m\le\tfrac23\)), without reset --- the
hysteresis of the controls above. The order is read either by
Lagouanelle's estimate or by A′'s own analogy (recorded in advance,
\texttt{sweep\_estimated.py}):
\textbf{Table 12.} Chandrupatla on the transformed function: the
multiplicity estimated during the run, against A′, the oracle of Table
11 and Chandrupatla on \(f\). Totals, failures charged; the 148 multiple
and fractional roots of Table 11, and the simple-root canonical set. The
estimated forms have no exit: an order once taken is held to the end of
the run. A′ leaves its regime by the exit of §6.2.
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\columnwidth - 8\tabcolsep) * \real{0.2000}}
>{\raggedright\arraybackslash}p{(\columnwidth - 8\tabcolsep) * \real{0.2000}}
>{\raggedright\arraybackslash}p{(\columnwidth - 8\tabcolsep) * \real{0.2000}}
>{\raggedright\arraybackslash}p{(\columnwidth - 8\tabcolsep) * \real{0.2000}}
>{\raggedright\arraybackslash}p{(\columnwidth - 8\tabcolsep) * \real{0.2000}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\raggedright
method
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
corpus 4
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
six corpora
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
multiple/fractional (148)
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
APS
\end{minipage} \\
\midrule\noalign{}
\endhead
\bottomrule\noalign{}
\endlastfoot
\textbf{A′} & \textbf{3656} & \textbf{13032} & 4042 & \textbf{2259} \\
Chandrupatla on \(g\), \(\hat m\) by analogy & 3806 & 15733 & 2809 &
3453 \\
Chandrupatla on \(g\), \(\hat m\) by Lagouanelle & 7526 & 30991 & 6041 &
7215 \\
the same, branch \(m\ge2\) only (post hoc) & 5568 & 18372 & 6540 &
2960 \\
Chandrupatla on \(g\), \(m^*\) known (Table 11) & --- & --- &
\textbf{1355} & --- \\
Chandrupatla on \(f\) & 5717 & 16481 & 7011 & 2595 \\
\end{longtable}
A′ is ahead of both estimated forms on corpus 4, in total and problem by
problem (against the analogy form 126/38/76, \(p=5\cdot10^{-4}\)), and
over the six corpora. The two estimators behave differently in this
frame. Lagouanelle's reads the parabola through Chandrupatla's points,
which alternate sides of the root; there it reports a fractional order
on 115 of the 154 simple roots of the canonical set, holds it, and turns
the method into little more than bisection. Restricted after the fact to
the branch \(m\ge2\) (post hoc,
\texttt{POSTHOC\_lag\_branch\_2026-09-22.md}), it no longer breaks, but
in this frame it hardly sees a multiple root either: 6540 on the 148
multiple and fractional roots against 7011 for Chandrupatla on \(f\),
and 5568 on corpus 4, with A′ ahead 178/34/28. The analogy's order is
the better one here too, and on the multiple and fractional roots it
does better inside Chandrupatla's interpolation than inside A′'s split:
it closes 59\%, 58\% and 31\% of the gap from A′ to the oracle on the
Chandrupatla set, corpus 1 and corpus 4 (322 against 654, 721 against
1229, 1766 against 2159). It pays on simple roots, where it has no exit
to take a false reading back (3453 against 2595 on the canonical set).
Two conclusions follow. First, the order read by analogy transfers to
the classical frame and works better there than in A′'s own split: on
the multiple and fractional roots Chandrupatla's interpolation with that
order beats A′ itself (2809 against 4042). Second, A′'s decision layer
as a whole --- the detector together with its exit --- earns its place:
without an exit the transferred detector loses more on simple roots than
it gains on multiple ones, and A′ stays ahead on corpus 4 and over the
six corpora.
\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center} \begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
@@ -1574,9 +1684,12 @@ translation, a simple root tends to the line, and the analogous pair
reads the order that decides between the model and a split. The method reads the order that decides between the model and a split. The method
built on it, A′, is ahead of Chandrupatla on both canonical sets, and on built on it, A′, is ahead of Chandrupatla on both canonical sets, and on
a corpus fixed before its code was frozen it needs 36\% fewer a corpus fixed before its code was frozen it needs 36\% fewer
evaluations and wins 177 problems to 28. Its decision layer beats evaluations and wins 177 problems to 28. Its detector, the order read by
Lagouanelle's estimate, Chandrupatla's band and no detector put in its analogy, beats Lagouanelle's estimate, Chandrupatla's band and no
place; with the multiplicity known in advance the classical detector put in its place, and it transfers: inside Chandrupatla's
interpolation on the transformed function it does better on multiple
roots than A′'s own split, while only A′'s exit keeps simple roots
cheap; with the multiplicity known in advance the classical
transformation is 2.4 to 6.8 times cheaper on multiple roots, which transformation is 2.4 to 6.8 times cheaper on multiple roots, which
measures what estimating the order costs. The claim the measurements measures what estimating the order costs. The claim the measurements
support is a lead over Brent, TOMS 748, ITP and ModAB everywhere, within support is a lead over Brent, TOMS 748, ITP and ModAB everywhere, within
@@ -1592,9 +1705,7 @@ behind or level.
The first is the price of estimating the order. With the multiplicity The first is the price of estimating the order. With the multiplicity
given, the transformation of §6.3 is 2.4 to 6.8 times cheaper than A′ on given, the transformation of §6.3 is 2.4 to 6.8 times cheaper than A′ on
multiple and fractional roots (Table 11): the order read from the multiple and fractional roots (Table 11): closing that gap is open.
analogous pair, or its use in the split, loses most of what the
transformation could deliver.
The second is the steep flank. Where the loss remains --- \texttt{fun9}, The second is the steep flank. Where the loss remains --- \texttt{fun9},
the near-cancelling class, 4 − tan x at its pole --- the base step the near-cancelling class, 4 − tan x at its pole --- the base step
@@ -1616,10 +1727,11 @@ implementation of the base rule and of A′ (\texttt{simroot/pure.py});
and Windows, Python 3.10 or later) whose results equal the reference bit and Windows, Python 3.10 or later) whose results equal the reference bit
for bit on all 868 problems of the six corpora; the corpora as code for bit on all 868 problems of the six corpora; the corpora as code
(\texttt{corpus\_*.py}); every sweep script with its results file; the (\texttt{corpus\_*.py}); every sweep script with its results file; the
pre-registrations with the commits of Appendix D; and advance records with the commits of Appendix D; and
\texttt{verify\_article.py}, which recomputes or re-reads every number \texttt{verify\_article.py}, which recomputes or re-reads every number
stated in this paper and is part of the test suite. All numbers come stated in this paper and is part of the test suite. All of it is
from one Linux machine (§4). Repository: ⟨repository URL⟩. released under the Apache License 2.0. All numbers come from one Linux
machine (§4). Repository: ⟨repository URL⟩.
\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center} \begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
@@ -2254,17 +2366,17 @@ results}\label{appendix-c.-negative-results}}
\textbf{The decision reading ``defect'' does not transfer.} Combined \textbf{The decision reading ``defect'' does not transfer.} Combined
with the regime it was the best configuration on the two development with the regime it was the best configuration on the two development
sets (§A.4's defect reading with the flat families of §6), and it sets (§A.4's defect reading with the flat families of §6), and it
passed every pre-registered criterion there. On new corpus 1 it did passed every criterion recorded for it there. On new corpus 1 it did
not: per problem 95/33/78 against Chandrupatla (\(p=0.22\)), losing not: per problem 95/33/78 against Chandrupatla (\(p=0.22\)), losing
the class of exponential flanks 9 to 26. It is therefore not part of the class of exponential flanks 9 to 26. It is therefore not part of
A′. A′.
\item \item
\textbf{A component rejected alone can pay in combination.} \textbf{A component rejected alone can pay in combination.}
Remembering the analogy for the run was rejected by its own Remembering the analogy for the run was rejected by its own advance
pre-registration, under the harness scoring of the time (canonical set record, under the harness scoring of the time (canonical set 2814
2814 against 2806 without the regime; under the sign-change criterion against 2806 without the regime; under the sign-change criterion the
the two are level, 2633 against 2634), and with the split of §6.3 it two are level, 2633 against 2634), and with the split of §6.3 it is
is the better form (with the step pattern, wide brackets 1250 against the better form (with the step pattern, wide brackets 1250 against
1388 for the analogy read in one state). Composition was measured, not 1388 for the analogy read in one state). Composition was measured, not
assumed, throughout --- which is also why §A.2's readings (2) and (3), assumed, throughout --- which is also why §A.2's readings (2) and (3),
each an improvement, are not combined. each an improvement, are not combined.
@@ -2272,9 +2384,9 @@ results}\label{appendix-c.-negative-results}}
\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center} \begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
\hypertarget{appendix-d.-pre-registrations-and-the-frozen-code}{% \hypertarget{appendix-d.-advance-records-and-the-frozen-code}{%
\subsection{Appendix D. Pre-registrations and the frozen \subsection{Appendix D. Advance records and the frozen
code}\label{appendix-d.-pre-registrations-and-the-frozen-code}} code}\label{appendix-d.-advance-records-and-the-frozen-code}}
Every rule of §6 and every test of §7 was written down, with its Every rule of §6 and every test of §7 was written down, with its
criteria and stop rule, before its code and its run. Table D1 gives, for criteria and stop rule, before its code and its run. Table D1 gives, for
@@ -2282,12 +2394,17 @@ each document, the commit that first added it and the commit that first
added the results its run wrote, both read from git by added the results its run wrote, both read from git by
\texttt{check\_prereg\_order.py}: 25 of the 30 were committed before \texttt{check\_prereg\_order.py}: 25 of the 30 were committed before
their results; four were committed together with them, so git cannot their results; four were committed together with them, so git cannot
order them; one was decided on its smoke run and has no results file. order them; one was decided on its smoke run and has no results file. We
The code of A′ was committed (\texttt{8027d7f}) after corpus 4 was call these documents advance records, not pre-registrations: they live
defined (\texttt{657df10}) and before its results (\texttt{6d2531e}); in the author's repository, and their order relative to the runs is
\texttt{simroot/pure.py} did not change in between. attested only by the author's git history, whose timestamps the author
sets; no external registry was used. A deposit with an external
timestamp (Zenodo, OSF) before a run would remove that limitation for
future tests. The code of A′ was committed (\texttt{8027d7f}) after
corpus 4 was defined (\texttt{657df10}) and before its results
(\texttt{6d2531e}); \texttt{simroot/pure.py} did not change in between.
\textbf{Table D1.} Pre-registrations, in the order they were written. \textbf{Table D1.} Advance records, in the order they were written.
\begin{longtable}[]{@{} \begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\columnwidth - 8\tabcolsep) * \real{0.3030}} >{\raggedright\arraybackslash}p{(\columnwidth - 8\tabcolsep) * \real{0.3030}}
@@ -2297,7 +2414,7 @@ defined (\texttt{657df10}) and before its results (\texttt{6d2531e});
>{\raggedright\arraybackslash}p{(\columnwidth - 8\tabcolsep) * \real{0.1313}}@{}} >{\raggedright\arraybackslash}p{(\columnwidth - 8\tabcolsep) * \real{0.1313}}@{}}
\toprule\noalign{} \toprule\noalign{}
\begin{minipage}[b]{\linewidth}\raggedright \begin{minipage}[b]{\linewidth}\raggedright
pre-registration advance record
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright \end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
commit commit
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright \end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
+1
View File
@@ -36,6 +36,7 @@ setup(
name="simbracket", name="simbracket",
version="1.0.0", version="1.0.0",
description="Bracketing root finding by similarity and analogy (compiled).", description="Bracketing root finding by similarity and analogy (compiled).",
license="Apache-2.0",
packages=["simbracket"], packages=["simbracket"],
package_data={}, package_data={},
include_package_data=False, include_package_data=False,