Skip to Content
AlgorithmsAlgorithms
  • Article
  • Open Access

3 December 2026

39 Pages

Global Convergence and Reliable Stopping in a Safeguarded Modified Anderson–Björck Method

and
1
Department of Computer Science, New Bulgarian University, 21 Montevideo Street, 1618 Sofia, Bulgaria
2
Proektsoft EOOD, 1164 Sofia, Bulgaria
*
Author to whom correspondence should be addressed.
Algorithms2026, 19(12), 1067;https://doi.org/10.3390/a19121067 
(registering DOI)

Abstract

The modified Anderson–Björck (modAB) method combines interpolation with bisection. Later code inspection revealed inconsistencies, notably the use of corrected ordinates instead of actual function values in its symmetry factor. We separate these values and extend the width-based fallback with a bounded number of residual-based exceptions. For a continuous function with a sign change, we prove global convergence in exact arithmetic without an iteration limit. Counterexamples show that rapid residual decrease alone need not contract the enclosing interval, even when the approximations converge to a root. We specify floating-point safeguards for interpolation, switching and stopping, and distinguish them from the measured implementation. The exact-arithmetic convergence results and the binary64 switching arithmetic are verified in Lean 4; this does not verify the full floating-point solver or the accuracy of function evaluations. On 101 benchmark functions, the revised implementation uses 1966 rather than 1991 function evaluations, a reduction of 1.3%; on the 93 reference-eligible cases the reduction is 1.5%. The same 90 cases pass independent validation. Measured run times are similar or modestly lower in the reported environments. No general speed advantage is claimed.

1. Introduction

Finding a zero of a scalar nonlinear function,
f ( x ) = 0 ,
is a fundamental task of numerical analysis. Bisection is globally reliable for a continuous function on an interval whose endpoint values on the opposite signs, but it uses only sign information and has linear convergence. False-position methods exploit endpoint ordinates and can be much faster, but the classical version may retain one endpoint for many iterations. The Illinois, Pegasus, and Anderson–Björck modifications were introduced to reduce this endpoint-sticking phenomenon [1,2,3,4]. Other safeguarded approaches include the Brent–Dekker family [5,6], Ridders’ method [7], and the ITP method [8].
The modified Anderson–Björck method was introduced for nonlinear equations arising in structural mechanics [9]. The subsequent paper [10] added the components on which the present method is built: a switching test whose deviation factor depends on the symmetry of the endpoint values, a termination test based on the bracket width, and an adaptive bisection fallback. That fallback compares the bracket width after each AB step with a threshold that is set when AB steps begin and halved at every AB step, and it returns to bisection when the width exceeds the threshold. Neither the switching test nor this width-based fallback is new in the present paper. Subsequent code inspection by L. Tomov revealed some issues that matter both mathematically and computationally. First, the Anderson–Björck correction had been prematurely applied to variables that were later treated as the true values of f at the bracket endpoints. Second, a finite-precision interpolation proposal could participate in a mixed absolute–relative stopping test before being projected back into the bracket. Both issues arise when a quantity used to construct the next iterate is also used, without the necessary checks, to decide that the equation has been solved.
The distinction between a function value and an interpolation ordinate is small in notation but substantial in practice. Rescaling an ordinate changes the line from which the next proposal is obtained without changing the function. Keeping these roles separate lets us first establish that the interval still contains a zero, and then ask whether its width must tend to zero. Bisection supplies one part of the answer. A shrinking reference width, against which each AB phase is tested, supplies the other. A strict width schedule can, however, interrupt an endpoint that is already approaching a zero rapidly and slow down the method. We therefore extend the fallback of [10] by allowing a finite number of consecutive exceptions when a new true residual improves on both endpoint residuals by a fixed factor. The resulting bound concerns the complete hybrid controller; it is not a new local order for the classical Anderson–Björck iteration, nor a claim of bisection’s minimax evaluation budget.
The finite exception allowance is a significant part of this guarantee. We exhibit a continuously differentiable function for which the true residual continues to decrease by more than one half per AB step while the bracket width tends to a positive limit. This complements the quadratic example which shows that residual progress explains why an exception can be useful, whereas the counterexample explains why exceptions must be limited. We also prove a cubic bound for the switching expression, separate its exact-arithmetic meaning from floating-point evaluation, and evaluate the bound on exceptions in the revised implementation.

1.1. Contributions Relative to [10]

The present paper makes four contributions.
  • Correction of the method. The actual values of the function are kept separate from the Anderson–Björck modified ordinates so that the bracket update, the switching test and termination use actual values only (Section 2 and Section 5.1).
  • Global convergence in exact arithmetic. For a continuous function with a sign change, the bracket width tends to zero, with an explicit bound in terms of bracket updates and a finite termination bound for a positive width tolerance (Section 3 and Section 4).
  • A bounded residual exception and its necessity. The width-based fallback of [10] is extended so that an AB phase may continue after a missed width threshold, at most M consecutive times and only when the residual decreases by the factor η . A continuously differentiable counterexample (Proposition 3) shows that without the bound M the bracket width can tend to a positive limit. With B = 2 and M = 3 , the worst-case constant of [10] is retained.
  • Floating-point safeguards and formal verification. We specify safeguards for interpolation, switching and stopping, including infinite and NaN values, analyze the rounding error of the switching test, give a scaled evaluation valid throughout the binary64 range (Section 5), and verify in Lean 4 both this switching arithmetic and the exact-arithmetic convergence results of Section 3 and Section 4 (Section 6). In binary64, this verification concerns the switching arithmetic only; it does not verify the full floating-point solver, the C# compiler and runtime, or arbitrary function evaluations.
The numerical experiments in Section 7 document the behavior of the corrected implementation. They show a modest reduction in function evaluations on the benchmark set and no general speed advantage over ref. [10].

1.2. Scope and Limitations

Theorem 1 is a statement about the mathematical iteration. It assumes exact real arithmetic, a continuous real-valued function on [ a 0 , b 0 ] with f ( a 0 ) f ( b 0 ) < 0 , and an iteration continued without an iteration limit. Global means that convergence holds for every such initial bracket, without a starting point close to a zero. It does not refer to a convergence order or to a particular zero: the worst-case bound guarantees one halving of the interval length per seven bracket updates, and the zero obtained depends on the iteration. The theorem is not a guarantee for floating-point function evaluations. A computed function value may have the wrong sign near a zero, or underflow to zero away from one (Section 7); the computed bracket then need not contain a zero of the mathematical function. The safeguards of Section 5 and Section 6 keep the trial points inside the computed bracket and, in the scaled variant, certify the switching decision, but they do not certify the supplied function values. The implementation also stops after a finite number of loop visits. The finite termination bound N max = q K of Corollary 2 can exceed that limit: for W 0 = 1 and τ = 10 − 14 it equals 329, whereas the experiments use 200 loop visits. A run that reaches the limit reports MaxIterationsExceeded rather than an approximation. For a discontinuous function with a sign change, the interval still contains a change of sign, which need not be a zero.

2. The Corrected Hybrid Method

2.1. Terminology and the Idea of the Proof

We use several standard terms in a very specific sense.
A bracket is a closed interval [ a , b ] for which the endpoint values have opposite signs:
f ( a ) f ( b ) < 0 .
For a continuous function, the intermediate value theorem then guarantees at least one zero between a and b. The word residual means simply the function value f ( x ) in the real-arithmetic analysis, or F ^ ( x ) when a floating-point evaluation is meant. It is a vertical error in the equation f ( x ) = 0 , not automatically a bound on the horizontal error in x.
An ordinate is the vertical coordinate of a point on a graph. Thus f ( a ) and f ( b ) are the true endpoint ordinates. The Anderson–Björck correction temporarily rescales one ordinate before drawing the next secant. We call the resulting values modified ordinates. They are interpolation data, not new values of the function.
An AB phase is a consecutive run of Anderson–Björck steps. A fallback ends such a phase and returns the method to bisection when the bracket has fallen behind its width schedule and no permitted residual exception remains. A step is called nonexpansive in width when it cannot make the bracket wider.
The proof answers two questions in order. First, can the method ever discard all zeros? The bracket invariant shows that it cannot. Second, can the bracket keep a positive width forever? Bisection halves it outright, while an AB phase is compared with a geometrically decreasing reference width. These two facts force the width to zero. The later quantitative argument merely counts how many bracket updates may be spent for each guaranteed factor-of-two reduction.

2.2. Assumptions and State Variables

The convergence analysis is carried out in exact real arithmetic under the following assumptions.
Assumption 1.
The function f : [ a 0 , b 0 ] → R is continuous, a 0 < b 0 , and
f ( a 0 ) f ( b 0 ) < 0 .
Unless the method terminates at an exact zero, all endpoint residuals are nonzero.

Counting Conventions

A bracket update replaces one endpoint by a new approximation x n after its function value has been found to be nonzero. Every nonterminating bisection step and every nonterminating AB step makes exactly one bracket update. Throughout Section 2, Section 3 and Section 4, iteration n means the n-th completed bracket update, I 0 is the initial bracket, and all bounds on the number of iterations count bracket updates. A function evaluation is one call of the supplied function. The initial endpoints require two evaluations, and every bisection or AB step requires one, at its midpoint or secant point. The switching test (11) uses the endpoint values before the update and the midpoint value already computed for that bisection step; the fallback test, the AB correction factor and the width test use stored values only. None of them requires an evaluation. Consequently, in exact arithmetic a method that terminates by the width test after n bracket updates has used E = n + 2 evaluations, and one that finds an exact zero at the next trial point has used E = n + 3 . The implementation counts loop visits separately; their relation to these counts is given in Section 7.4. Table 1 summarizes the cost of each operation.
Table 1. Function evaluations and bracket updates caused by each operation.
The switching decision is made only during a bisection step, from values already available, and it determines the type of the following step.
At iteration n, the method stores a bracket
I n = [ a n , b n ] , a n < b n ,
and the true endpoint residuals
α n = f ( a n ) , β n = f ( b n ) .
During an Anderson–Björck (AB) phase, it also stores modified ordinates
u n , v n .
They obey
sign ( u n ) = sign ( α n ) , sign ( v n ) = sign ( β n ) , u n v n < 0 ,
but their magnitudes may differ from the true residuals. A new AB phase starts with
u n = α n , v n = β n .
The distinction between the actual values of the function in (3) and the modified values in (4) is essential. The actual values are used to maintain the interval containing the root, to evaluate the switching criterion, and to assess convergence at termination. The modified values enter only the secant formula for the next approximation.

2.3. Successive Approximations and the Enclosing Interval

The method starts with bisection. A bisection step gives the approximation
x n = a n + b n 2 .
An AB step uses the false-position formula with the modified ordinates,
x n = a n v n − b n u n v n − u n .
If f ( x n ) = 0 , the method terminates at an exact zero. Otherwise, we replace by x n the endpoint whose function value has the same sign as f ( x n ) . If two consecutive steps of an AB phase replace the same endpoint, the modified ordinate at the retained endpoint is multiplied by a finite positive factor θ n > 0 . The usual Anderson–Björck rule takes
θ n = 1 − f ( x n ) / f ( e n ) , 1 − f ( x n ) / f ( e n ) > 0 , 1 / 2 , otherwise ,
where e n is the endpoint to be replaced. After two consecutive replacements on the same side, the ordinate at e n equals the actual value of the function there, since that endpoint was introduced at the preceding step. The implementation may therefore use the stored interpolation ordinate in this ratio without changing the Anderson–Björck formula. At the new endpoint, the modified ordinate is set equal to f ( x n ) . The bisection step whose switching test starts an AB phase is counted as the first step of that phase, as in [10]: the endpoint it replaces is recorded. If the first AB step replaces the same endpoint, the retained ordinate is therefore rescaled already at that step; the endpoint just replaced carries its actual function value, so the ratio above is the usual one. If the first AB step replaces the other endpoint, it simply becomes the recorded endpoint, and the phase continues exactly as if the record had been empty. This is a valid initialization of the side history, not an erroneous state. The local difference in the update rule occurs at the first AB step; it can alter subsequent points and evaluation counts. The convergence proof uses positivity of the correction factors (Lemma 3) and the bounded width exceptions, so it applies to both initialization conventions. More explicitly, if W is the width before the switching bisection, then S = W / 2 . The entry comparison succeeds because S ≤ B W for B ≥ 1 / 2 , and halving the stored threshold B W gives B S = 2 B S / 2 , exactly the threshold for the first true chord. The phase counter therefore starts at t = 0 after the switching bisection. These initialization and sign-preservation facts are formalized in TopEntry.lean; the general phase and convergence proofs are unchanged.

2.4. Switching Between Bisection and Anderson–Björck Steps

When a bisection step is evaluated at the midpoint m = ( a + b ) / 2 , define the midpoint value of the endpoint chord,
L ( m ) = f ( a ) + f ( b ) 2 ,
and the symmetry factor
r = 1 − L ( m ) f ( b ) − f ( a ) , k = r 2 .
The method may switch from bisection to AB steps when
| f ( m ) − L ( m ) | < k | f ( m ) | + | L ( m ) | .
The global convergence proof does not depend on this particular switching criterion. It depends on the condition for returning to bisection, which we specify below.
Lemma 1 (A cubic bound for the switching expression).
Let f 1 and f 2 be nonzero real endpoint values of opposite signs, and put
D   =   | f 2 − f 1 |   =   | f 1 |   +   | f 2 | , y m = f 1 + f 2 2 , v = | y m | D , k = ( 1 − v ) 2 .
For any real midpoint residual y 3 , let H = max ( D , | y 3 | ) . Then 0 ≤ v ≤ 1 / 2 and, in exact arithmetic,
k | y m |   +   k | y 3 |   ≤   H ( 1 − v ) 2 ( 1 + v ) ≤ H .
Proof. 
The triangle inequality gives
| y m |   =   1 2 | f 1 + f 2 |   ≤   1 2 ( | f 1 |   +   | f 2 | ) = D / 2 .
Since D > 0 , division by D gives 0 ≤ v ≤ 1 / 2 . Moreover,
k | y m |   +   k | y 3 |   = ( 1 − v ) 2 ( v D   +   | y 3 | )   ≤   H ( 1 − v ) 2 ( 1 + v ) .
To bound the remaining dimensionless factor, define
Q ( v ) = ( 1 − v ) 2 ( 1 + v ) = 1 − v − v 2 + v 3 .
Its derivative satisfies
Q ′ ( v ) = 3 v 2 − 2 v − 1 = ( v − 1 ) ( 3 v + 1 ) < 0 ( 0 ≤ v ≤ 1 / 2 ) .
Thus Q is decreasing, and its endpoint values yield 3 / 8 = Q ( 1 / 2 ) ≤ Q ( v ) ≤ Q ( 0 ) = 1 . Substitution proves (13).    □
The lemma bounds the right-hand side of (11) in exact arithmetic. Section 5.5 gives the corresponding rounding-error analysis: first for the distributed expression when all intermediate results are in the normal range, and then for a scaled evaluation valid throughout the finite binary64 range. Here Q ( v ) is dimensionless, whereas H Q ( v ) has the same scale as the values of the function.
Suppose an AB phase starts immediately after a bisection update and the resulting width is
S = W c = b − a .
Within this phase, use local indices: [ a t − 1 , b t − 1 ] is the interval before AB step t, x t is the approximation computed at that step, and W t is the interval length after the endpoint replacement. Thus t ≥ 1 counts actual interpolation steps after the switching bisection. The latter seeds the side history but is not included in this local index. In the top implementation its pre-update threshold is immediately halved; since bisection halves the width in exact arithmetic, the first actual AB step still uses B S . Choose B ≥ 1 / 2 , an integer M ≥ 0 , and a residual factor 0 < η < 1 . Initialize a counter c = 0 and a width threshold B S . At step t the threshold used in the comparison is
T t = B S 2 − ( t − 1 ) = 2 B S 2 t .
Before replacing an endpoint, denote the smaller of the two endpoint residual magnitudes by
R t − = min { | f ( a t − 1 ) | , | f ( b t − 1 ) | } .
This minimum is taken over the actual values of the function. After replacing the endpoint, let W t be the length of the resulting interval and apply the following conditions in order:
  • If W t ≤ T t , continue with AB steps and set c = 0 .
  • Else, if
    | f ( x t ) | < η R t − and c < M ,
    continue with AB steps and increase c by one.
  • Else end the AB phase and take a bisection step next. Restore the modified ordinates to the actual endpoint values and discard the record of the endpoint replaced in the preceding AB step.
Whenever the phase continues, halve the threshold for the next step. Allowing an exception on the basis of residual decrease does not restart this sequence of thresholds. Thus the counter records consecutive exceptions to the width condition; it returns to zero when that condition is satisfied or a new AB phase begins.
In the numerical experiments we use
B = 2 , M = 3 , η = 1 42 .
The small residual factor grants an exception only when the residual decreases by more than a factor of 42, that is, when interpolation is converging rapidly towards one endpoint. The value 1 / η = 42 is the smallest integer not less than 2 1074 / 200 ≈ 41.4 : a residual that decreased by this factor at each of the 200 loop visits allowed in the experiments would fall from 1 below the smallest positive subnormal number 2 − 1074 , thus exhausting the binary64 range including gradual underflow. We take this rate as the scale of a significant residual reduction, not as an accuracy or termination certificate. The width bounds below do not depend on η ∈ ( 0 , 1 ) , and the results are insensitive to its exact value; the choice of η and M is examined in Section 7.4. The first two thresholds, 2 S and S, are always satisfied because the interval lengths are nonincreasing. The first possible violation of the width condition occurs after the third AB step, when the threshold is S / 2 . At most three consecutive violations are permitted, and each requires (17). If steps 3, 4 and 5 all require residual exceptions, then the allowance is exhausted before step 6. In that case, the sixth AB step must find an exact zero or satisfy the width condition; else the method returns to bisection. If an intervening step satisfies the width condition, the counter returns to zero and later exceptions remain possible. Thus six is not an upper bound on the number of steps in an AB phase.
The implementation parameter MaxResidualSteps represents the bound M on consecutive exceptions, rather than a bound on the number of steps in an AB phase. A phase can continue for longer if the width condition is subsequently satisfied. The separate parameter MaxIterations bounds the number of loop visits of the implementation and reaching it may produce MaxIterationsExceeded. Such termination neither forces a bisection step nor implies a bound on the length of the interval. Proposition 3 shows why a bound on the total number of iterations cannot replace the bound on consecutive exceptions.
For the convergence estimates, define
C = 2 M + 1 B .
Lemma 5 proves that an active phase satisfies W t ≤ C S / 2 t , even when individual width conditions are violated. Thus (18) gives
C = 32 = 2 5 .
The same upper bound is obtained for the fixed-delay version by setting B = 16 and M = 0 . This is the width-based rule of [10], called an adaptive bisection fallback there. We refer to it as the fixed-delay rule to distinguish it from the extension with residual exceptions. In that case the first five width conditions hold automatically, and the first comparison with S / 2 occurs after the sixth AB step. The earlier convention of multiplying the width before the switching bisection by 16 gives the same bound in exact arithmetic since that bisection halves the interval length. This equivalence in exact arithmetic, however, does not imply bitwise agreement between floating-point implementations.

3. Preservation of the Enclosing Interval

Lemma 2 (Interiority of the AB approximation).
Let a < b and u v < 0 . Then
x = a v − b u v − u
belongs to ( a , b ) .
Proof. 
Assume without loss of generality that u < 0 < v . Then
x = a v + b | u | v + | u | = λ a + ( 1 − λ ) b , λ = v v + | u | ∈ ( 0 , 1 ) .
Thus x is a strict convex combination of a and b and belongs to ( a , b ) . The case v < 0 < u follows in the same way.    □
Lemma 3 (Preservation of the signs of the modified ordinates).
Suppose (5) holds. If the retained modified ordinate is multiplied by a finite factor θ > 0 and the newly inserted endpoint receives the actual function value at the new point, then (5) holds at the next nonterminating AB step.
Proof. 
Multiplication by a positive factor preserves the sign of the retained ordinate. At the new endpoint, the modified ordinate equals the actual value of the function. Since the new interval has endpoint values of opposite signs, the modified ordinates also have opposite signs.    □
Proposition 1 (Nested intervals containing a zero).
At every nonterminating iteration,
f ( a n ) f ( b n ) < 0 , I n + 1 ⊆ I n .
Consequently, every I n contains at least one zero of f, and the widths
W n = b n − a n
are nonincreasing. A bisection step gives
W n + 1 = 1 2 W n .
Proof. 
The sign condition holds initially by Assumption 1. The midpoint belongs to the current interval as does the AB approximation by Lemma 2. Unless this new point is an exact zero, precisely one of the two resulting subintervals has endpoint values of opposite signs. The method selects this subinterval, which contains a zero by continuity and the intermediate value theorem. This proves the nesting property and the monotonicity of the interval lengths. A bisection step gives a subinterval of half the preceding length.    □

3.1. Residual Decrease During an Exceptional AB Step

Lemma 4 (Decrease of the smaller endpoint residual).
Let R − = min ( | f ( a ) | , | f ( b ) | ) > 0 before a nonterminating step within the interval, and let R + be the corresponding minimum after the sign-preserving update. If the new residual satisfies | f ( x ) | < η R − with 0 < η < 1 , then
R + = | f ( x ) | < η R − .
For k consecutive such steps, the final minimum is less than η k times its initial value.
Proof. 
The retained endpoint has residual magnitude at least R − . The newly inserted endpoint has residual magnitude below η R − < R − . It therefore becomes the endpoint with the smaller residual magnitude, which proves (24). Repeated substitution proves the last claim.    □
The minimum must be taken before replacing the endpoint. After the replacement it would be no greater than | f ( x ) | , making the strict contraction inequality impossible. In exact arithmetic, replacing f by c f , c ≠ 0 , leaves the condition unchanged since both sides are multiplied by | c | . Residual decrease alone, however, does not give a bound on the error in the root approximation. Near a zero of multiplicity m, the model f ( x ) ≃ c ( x − α ) m shows that reducing the residual by a factor η reduces the distance to the zero by approximately η 1 / m . The bound on the interval length and the finite number of permitted exceptions are therefore still needed for the geometric convergence estimate. In general, neither AB steps nor bisection steps make the smaller endpoint residual decrease monotonically; the lemma applies only when its contraction hypothesis is satisfied.

3.2. One-Sided Convergence Without Contraction of the Interval

Proposition 2 (A one-sided quadratic AB phase).
For the continuously differentiable function
f ( x ) = x , x ≤ 0 , x + x 2 , x > 0 ,
an AB phase starting from [ − 1 , 1 ] with the actual endpoint values as its initial ordinates has a fixed right endpoint. If interpolation is continued without a width fallback, the left-endpoint error converges quadratically to zero, whereas the bracket width tends to one.
Proof. 
Write the left endpoint as − e and the right modified ordinate as v > 1 . The actual left ordinate is − e . The next secant approximation is − e ′ , where
e ′ = e ( v − 1 ) v + e > 0 .
Starting with e = 1 , v = 2 , the first two errors are 1 / 3 and 1 / 7 . The second consecutive update of the left endpoint activates the AB correction. Whenever it is applied,
v ′ = v 1 − e ′ e = v ( 1 + e ) v + e = 1 + e ′ .
Thus the next trial point remains to the left and, from the error 1 / 7 onward,
e k + 1 = e k 2 1 + 2 e k .
This positive sequence decreases to zero and e k + 1 / e k 2 → 1 . Its first subsequent values are 1 / 63 , 1 / 4095 and 1 / 16,777,215 . The right endpoint stays at one, so W k = 1 + e k → 1 .    □
This phase also occurs within the hybrid method. Starting from [ − 3 , 1 ] , the first midpoint is − 1 , and the switching inequality is 0.5 < 0.81 ( 1 + 0.5 ) . The method therefore enters the AB phase described above. Since the switching bisection has already replaced the left endpoint, the correction is applied from the first AB step, and (26) holds from the error 1 / 3 onward, giving 1 / 15 , 1 / 255 and 1 / 65,535 . Here the left endpoint converges quadratically even though the interval length tends to a positive limit. This is a property of this particular phase only. With only finitely many consecutive exceptions permitted, the method eventually returns to bisection unless it has already satisfied a stopping condition.

3.3. Necessity of a Bound on Consecutive Residual Exceptions

In the preceding example, continued interpolation rapidly improves one endpoint approximation. The next example shows why residual decrease cannot be the only condition for continuing an AB phase: even a uniform reduction by more than one half at every subsequent step need not force the interval length to zero.
Proposition 3 (Residual contraction without width convergence).
Consider the usual AB correction, the switching test (11), and the rule with B = 2 , η = 1 / 2 , but with no bound on the number of residual exceptions. For
f ( x ) = − x 2 , x < 0 , 7 x 2 , x ≥ 0 , [ a 0 , b 0 ] = [ − 3 , 1 ] ,
the exact-arithmetic process enters an AB phase after its first bisection and never leaves it. The left endpoints converge to the unique zero, while the right endpoint remains 1 and the width tends to 1. From the third AB step onward, the ratio of the new residual magnitude to the smaller preceding endpoint residual magnitude is at most 0.49 < 1 / 2 . The function belongs to C 1 ( R ) .
Proof. 
The only zero is 0. On the two open half-lines the derivatives are − 2 x and 14 x , respectively. At zero, f ′ ( 0 ) = lim h → 0 f ( h ) / h = 0 , and both one-sided derivatives tend to zero. This proves the stated regularity.
Initially f ( − 3 ) = − 9 and f ( 1 ) = 7 . The first midpoint is − 1 , with f ( − 1 ) = − 1 , and the chord midpoint value is also ( − 9 + 7 ) / 2 = − 1 . Consequently, the left-hand side of (11) is zero and its right-hand side is positive. The method enters AB on [ − 1 , 1 ] .
Let j count AB steps after this entry. Write the left endpoint as − e j and the retained right modified ordinate as v j , with e 0 = 1 and v 0 = 7 . The actual function value at the left endpoint is − e j 2 . If the next trial point remains to the left of the zero, the secant formula gives
e j = e j − 1 v j − 1 − e j − 1 2 v j − 1 + e j − 1 2 .
The switching bisection replaced the left endpoint, e 0 = 1 , and the first AB step replaces it again. The retained right ordinate is therefore rescaled already at the first AB step. Hence
e 1 = 7 − 1 7 + 1 = 3 4 , v 1 = 7 1 − e 1 2 e 0 2 = 49 16 , e 2 = v 1 e 1 − e 1 2 v 1 + e 1 2 = 111 232 .
Both approximations lie strictly to the left of zero and are closer to it than the preceding left endpoint.
For two successive updates of that endpoint, the AB multiplier is 1 − e j 2 / e j − 1 2 , which is positive whenever 0 < e j < e j − 1 . Rearranging (28) gives
( e j − 1 − e j ) v j − 1 = e j − 1 2 ( 1 + e j ) .
Thus, for j ≥ 1 while these inequalities hold,
v j = v j − 1 1 − e j 2 e j − 1 2 = e j − 1 2 ( 1 + e j ) e j − 1 − e j ( e j − 1 − e j ) ( e j − 1 + e j ) e j − 1 2 = ( 1 + e j ) ( e j − 1 + e j ) .
Applying this identity at j = 2 and then taking the next secant yields
e 3 = 2,664,111 8,512,544 , ρ 3 : = e 3 e 2 = 24,001 36,692 .
In particular, 0 < e 3 < 2 / 5 and 1 / 2 < ρ 3 < 7 / 10 .
To prove that all subsequent approximations have the same properties, put ρ j = e j / e j − 1 . Using (29) in the next secant, we obtain
e j + 1 e j = v j − e j v j + e j 2 = ( 1 + e j ) e j − 1 + e j 2 ( 1 + e j ) e j − 1 + e j + 2 e j 2 = 1 + e j ( 1 + ρ j ) 1 + ρ j + e j ( 1 + 2 ρ j ) .
The last equality divides numerator and denominator by e j − 1 > 0 . Define
Φ ( e , ρ ) = 1 + e ( 1 + ρ ) 1 + ρ + e ( 1 + 2 ρ ) .
For e ≥ 0 and ρ > 0 its denominator is positive, and direct differentiation gives
∂ Φ ∂ ρ = − ( 1 + e ) 2 [ 1 + ρ + e ( 1 + 2 ρ ) ] 2 < 0 , ∂ Φ ∂ e = ρ 2 [ 1 + ρ + e ( 1 + 2 ρ ) ] 2 > 0 .
On 0 ≤ e ≤ 2 / 5 , 1 / 2 ≤ ρ ≤ 7 / 10 , monotonicity therefore gives
10 17 = Φ ( 0 , 7 / 10 ) ≤ Φ ( e , ρ ) ≤ Φ ( 2 / 5 , 1 / 2 ) = 16 23 < 7 10 .
Both bounds belong to [ 1 / 2 , 7 / 10 ] . Since the required inequalities hold for j = 3 , induction gives
0 < e j + 1 ≤ 7 10 e j , ρ j + 1 ∈ [ 1 / 2 , 7 / 10 ] .
These inequalities simultaneously prove that the next trial point remains strictly left of zero, that the AB multiplier stays positive, and that the hypotheses are preserved. Thus e j → 0 , and the right endpoint is never replaced.
The actual value of the function at the right endpoint is 7 and the left residual magnitude is e j 2 ≤ 1 . Before AB step j the minimum residual magnitude is therefore e j − 1 2 . For every j ≥ 3 ,
| f ( − e j ) | min { | f ( − e j − 1 ) | , | f ( 1 ) | } = ρ j 2 ≤ ( 7 / 10 ) 2 = 0.49 < 1 2 .
At the beginning of the phase the width is S = 2 , so the threshold at AB step j is T j = 4 / 2 j − 1 . The first two interval lengths satisfy the respective bounds 4 and 2. For j ≥ 3 , however, T j ≤ 1 while W j AB = 1 + e j > 1 . The width condition is therefore violated at every subsequent step, whereas (31) permits a residual exception at each of these steps. Without a bound on their number, the AB phase continues indefinitely and the interval length tends to 1.    □
The proof assumes the convention of Section 2, in which the switching bisection is the first step of the phase. If instead the first AB step is never rescaled, the same argument applies with v 1 = 7 , e 2 = 75 / 121 , e 3 = 146,325 / 384,296 and ρ 3 = 1951 / 3176 .
The same example shows that the earlier global estimate cannot be retained after removing the bound on consecutive exceptions. If N counts all bracket updates, including the initial bisection, then W 0 = 4 and
W 14 = 1 + e 13 > 1 = W 0 2 − ⌊ 14 / 7 ⌋ .
The approximations themselves still converge to the zero. What fails is convergence of the whole bracket and, consequently, width-based termination at a tolerance below the limiting width. For the mixed tolerance used here, any fixed ε abs < 1 and finite ε rel leave the width test unsatisfied for all sufficiently late steps since the candidate tends to zero. In particular, the tolerances of the numerical experiment in Section 7.4 cannot terminate this exact-arithmetic process by width. It never encounters an exact zero.

3.4. A Geometric Bound on the Interval Length During an AB Phase

Lemma 5 (Geometric upper bound for an AB phase).
Let a phase start with width S, use (15), and permit at most M consecutive width-test exceptions while active. If it is still active after t steps, then
W t ≤ C S 2 t , C = 2 M + 1 B .
Proof. 
If the width condition is satisfied at step t, then W t ≤ T t , which is stronger than (33). Otherwise, let j = t − c be the last index at which it was satisfied. Since the phase continues, c ≤ M . If the condition has not yet been satisfied, take j = 0 and set T 0 = 2 B S ; then W 0 = S ≤ T 0 because B ≥ 1 / 2 . The bracket widths are nonincreasing, so in either case
W t ≤ W j ≤ T j = 2 c T t ≤ 2 M 2 B S 2 t = C S 2 t .
Whenever the width condition is satisfied, the counter returns to zero and the estimate W j ≤ T j holds at that index. The same argument therefore applies after any number of such resets.    □
The proof depends on the bound on consecutive exceptions but not on the value of η . The residual condition determines when an exception is permitted and the bound on their number gives the estimate for the length of the interval. If an AB step leads to a return to bisection, (33) need not hold after that last AB step. Both this step and the following bisection are included explicitly in the iteration bound derived below.
The result holds for every finite integer M ≥ 0 , not only for M = 3 . For fixed B, increasing the number of permitted consecutive exceptions by one doubles the constant C = 2 M + 1 B . With B = 2 , the iteration bound below uses q = M + 4 . In particular, M = 3 gives q = 7 ; every other finite choice also gives an upper bound on the length of the interval. Proposition 3 shows that this estimate cannot be retained if arbitrarily many consecutive exceptions are permitted. It does not single out three as the necessary or optimal finite bound.

4. Global Convergence

The preceding results show that every interval contains a zero. It remains to prove that the interval lengths tend to zero. We first prove convergence and then estimate the number of iterations needed for a given reduction in length. For the latter estimate, we must also account for a final AB phase that has not yet ended.
Throughout this section, W n denotes the interval length after n completed endpoint replacements, with W 0 = b 0 − a 0 . We study the iteration without a bound on its length and without a positive stopping tolerance. The process may still terminate at an exact zero. In the implementation, termination at an exact zero or upon satisfying the prescribed width tolerance already gives the required result.

4.1. Convergence of the Enclosing Intervals

Theorem 1 (Global convergence).
Under Assumption 1, with the actual function values and modified ordinates kept separate and the adaptive rule of Section 2, the exact-arithmetic iteration, continued without an iteration limit, either terminates at an exact zero or satisfies
W n ⟶ 0 .
In the latter case, the nested brackets shrink to a single point x ∗ , and that point satisfies f ( x ∗ ) = 0 .
Proof. 
We distinguish two cases.
Case 1: infinitely many bisection steps. Each bisection halves the current interval length, and no intervening AB step increases it. After j bisections the length is therefore at most W 0 / 2 j , which tends to zero.
Case 2: finitely many bisection steps. After the last bisection, all subsequent steps belong to a single AB phase. Indeed, ending that phase would require another bisection, contrary to the choice of the last one.
Let W c be the width at the start of that phase and let W ( t ) be the width after t AB steps. Because the phase is still active, Lemma 5 gives
W ( t ) ≤ C W c 2 t .
The right-hand side tends to zero, and hence so does W ( t ) .
Thus W n → 0 in either case. By Proposition 1, the closed intervals I n are nonempty, nested, and contain a zero. A standard nested-interval argument now shows that their intersection consists of one point:
⋂ n = 0 ∞ I n = { x ∗ } .
To verify that this point is a zero, choose any zero z n ∈ I n . Both z n and x ∗ lie in the same interval, so
| z n − x ∗ | ≤ W n ⟶ 0 .
Thus z n → x ∗ . Since f ( z n ) = 0 and f is continuous, f ( x ∗ ) = 0 .    □
Remark 1 (Scope of the convergence argument).
The argument does not assume differentiability, a unique zero, a particular local convergence order, or the specific switching test (11). It uses only intervals whose endpoint values have opposite signs, interpolation points within these intervals, nonincreasing interval lengths, the geometric upper bound during each continuing AB phase, and the bisection step that follows the end of a phase.

4.2. An Upper Bound on the Number of Bracket Updates

To obtain a quantitative convergence estimate, define
d = ⌈ log 2 C ⌉ , q = d + 2 .
The integer d is chosen so that C ≤ 2 d . The additional two iterations in q account for the last AB step of a phase and the bisection step that follows it.
We say that a sequence of iterations gives h halvings if its final interval length, relative to the initial length S, is at most
S 2 h .
This terminology describes the reduction in interval length; it does not require the sequence to contain h actual bisection steps.
A completed phase block consists of an AB phase with t ≥ 1 AB steps, followed by the first bisection after fallback. Its total length is ℓ = t + 1 .
Lemma 6 (Guaranteed shrinkage of a completed AB phase).
Let a completed phase block start with width S. At its end the width is at most S / 2 h , where
h = 1 , t ≤ d + 1 , t − d , t ≥ d + 2 .
In both cases,
ℓ ≤ q h .
Proof. 
We consider the two ranges of t separately.
If t ≤ d + 1 , the AB steps do not increase the interval length, and the following bisection halves it. Thus h = 1 , and
ℓ = t + 1 ≤ d + 2 = q = q h .
Now suppose that t ≥ d + 2 . The phase was still active after step t − 1 . Lemma 5 therefore gives
W ( t − 1 ) ≤ C S 2 t − 1 ≤ S 2 t − d − 1 ,
where the last inequality uses C ≤ 2 d . The tth AB step cannot increase the width, and the following bisection divides it by two. Hence
W end ≤ S 2 t − d .
The block therefore guarantees h = t − d halvings. Since h ≥ 2 and t = d + h ,
ℓ = t + 1 = d + h + 1 ≤ ( d + 2 ) h = q h .
   □
Table 2 summarizes the two estimates. For a short AB phase, the following bisection alone gives the required reduction. For a long phase, the geometric bound already implies a stronger reduction before that bisection.
Table 2. Shrinkage guaranteed by a completed phase block.
The first n iterations may end within an AB phase or just after its last AB step, before the following bisection. We therefore also need an estimate for this possibly incomplete final part.
Lemma 7 (An incomplete final AB phase).
Suppose the first n iterations end either within an AB phase or immediately after its last AB step, before the following bisection. Let S be the interval length at the start of this final AB phase. If the unfinished part has length ℓ tail , then there is an integer h tail ≥ 0 such that its final width is at most S / 2 h tail and
ℓ tail ≤ q h tail + ( q − 1 ) .
Proof. 
Let t be the number of AB steps in the unfinished part.
If the phase is still active and t ≤ d , take h tail = 0 . Then t ≤ d = q − 2 < q − 1 . If the phase is still active and t ≥ d + 1 , Lemma 5 gives
W ( t ) ≤ C S 2 t ≤ S 2 t − d .
Thus we may take h tail = t − d , and t = d + h tail ≤ q h tail .
It remains to consider a final AB step that has just triggered fallback. If t ≤ d + 1 , again take h tail = 0 ; then t ≤ d + 1 = q − 1 . If t ≥ d + 2 , the phase was active after step t − 1 , so
W ( t ) ≤ W ( t − 1 ) ≤ C S 2 t − 1 ≤ S 2 t − d − 1 .
Now take h tail = t − d − 1 . Since t = h tail + d + 1 ,
t ≤ q h tail + ( q − 1 ) .
These cases cover every possible unfinished final part.    □
Theorem 2 (A global bound on the interval length).
Under the assumptions of Theorem 1, after any n completed bracket updates, unless an exact zero was found earlier,
W n ≤ W 0 2 − ⌊ n / q ⌋ , q = ⌈ log 2 C ⌉ + 2 .
Proof. 
Partition the first n iterations into:
  • Bisection steps not already included in a completed phase block;
  • Completed phase blocks from Lemma 6;
  • At most one unfinished final part from Lemma 7.
Let H be the sum of the numbers of halvings given by these parts. A single bisection has length 1 and gives one halving. Each completed phase block of length ℓ satisfies ℓ ≤ q h , while the incomplete final part satisfies the bound in Lemma 7. Adding these inequalities gives
n ≤ q H + ( q − 1 ) .
Because H is an integer, this implies
H ≥ n q .
Indeed, if H ≤ ⌊ n / q ⌋ − 1 , then
n ≤ q n q − 1 + ( q − 1 ) < q n q ≤ n ,
which is impossible. The accumulated halvings give W n ≤ W 0 / 2 H , and the stated bound follows.    □
Corollary 1 (The adaptive method with B = 2 and M = 3 ).
For the adaptive method in exact arithmetic with B = 2 , M = 3 and any η ∈ ( 0 , 1 ) ,
C = 32 , d = 5 , q = 7 ,
and therefore
W n ≤ W 0 2 − ⌊ n / 7 ⌋ .
Figure 1 shows the common geometric upper bound used in the proof, which is also the fixed-delay threshold. In the fixed-delay version, the first five width conditions hold automatically. In the adaptive version, only the first two hold automatically; up to three consecutive exceptions are then permitted when the residual decrease is sufficient.
Figure 1. Normalized geometric upper bound 32 / 2 t , which is also the threshold for the fixed-delay version. The adaptive threshold T t / S = 4 / 2 t is not plotted. An active adaptive phase remains below the geometric upper bound.
Corollary 2 (Finite termination for an absolute width tolerance).
Let τ > 0 , and suppose the method stops as soon as W n ≤ τ . Define
K = max 0 , log 2 W 0 τ .
Unless an exact zero is found earlier, W q K ≤ τ . Thus the method terminates after at most
N max = q K
bracket updates. For C = 32 , one may take q = 7 .
Proof. 
If an exact zero is found earlier, the conclusion is immediate. Otherwise, by the definition of K, W 0 / 2 K ≤ τ . Applying Theorem 2 at n = q K gives
W q K ≤ W 0 2 − ⌊ q K / q ⌋ = W 0 2 K ≤ τ .
   □

4.3. An Error Bound at Termination

Let
Z = { z ∈ [ a 0 , b 0 ] : f ( z ) = 0 }
be the set of all zeros in the initial bracket. If the algorithm returns a point x n ∈ I n after a width test W n ≤ τ , then
dist ( x n , Z ) ≤ τ .
Here dist ( x n , Z ) means the distance from x n to the nearest zero in Z. The estimate is immediate: the current bracket contains at least one zero z, and both x n and z lie in an interval of width at most τ .
Using the whole zero set rather than a preselected zero is standard in variational analysis [11,12]. It is also natural for periodic functions or for a bracket containing several zeros.
A small residual | f ( x n ) | alone is not a scale-independent error bound. If, however, the bracket contains a unique zero x ∗ , f is differentiable, and
| f ′ ( x ) | ≥ m > 0
throughout the bracket, the mean value theorem gives
| x n − x ∗ | ≤ | f ( x n ) | m .

5. Implementation and Reliable Stopping

In the C# implementation, the endpoint coordinates are stored in p1.X and p2.X. The fields p1.Y and p2.Y retain the actual function values α and β , whereas the local variables f1 and f2 hold the modified ordinates u and v. This separation is the main correction. A change to u or v changes the next interpolation point; it must not change which signs define the bracket.

5.1. Correspondence Between the Method and Its Implementation

The earlier review drafts used two implementation variants that numbered their corrections separately; their names below are historical labels, not files in the current source bundle. The current implementation is Root/Solvers/SgModAB.cs. Table 3 brings together the six changes in ModAB3C and the two additional structural changes in ModAB3. The third numbered comment in the simplified method concerns the common secant safeguard and is included in row 2. These eight changes describe the relation to the earlier implementation; they are not eight separate modifications of the convergence theorem. Row 6 concerns the fixed-delay version. The adaptive residual rule replaces that delay, while retaining the separation of actual and modified ordinates and the same sign-preserving interval update.
Table 3. Eight modAB changes and their purpose. C1–C6 identify the numbered comments in ModAB3C; S1–S2 identify those in ModAB3.
Row 8 states the convention of the packaged code. The value zero means that no endpoint move has yet been recorded in the phase; the switching bisection can supply the first record. Correcting the description does not change the iteration sequence or the proof. Similarly, centralizing the secant safeguards removes a local Clamp call and duplicate non-finite checks without introducing a new interpolation formula.
Further corrections address overflow when computing the interval length, rounding of the midpoint outside an interval with subnormal endpoints, and a final width check after the iteration limit. These corrections, described below, were proposed in the subsequent review and are separate from the eight changes in the table.

5.2. The Iteration in Finite Precision

The following procedure specifies the adaptive method together with the additional finite-precision safeguards proposed in the earlier review. The switching test always uses the endpoints before the current bisection update. If it passes, that update becomes the first step of the AB phase.
  • Order the finite endpoints a ≤ b , evaluate their actual function values, and reject NaN or equal nonzero endpoint signs. Return an endpoint if its actual function value is a machine zero. Set ( u , v ) = ( α , β ) , select bisection, and clear the record of the last endpoint moved in an AB phase. The tolerances must be finite and non-negative.
  • Construct the midpoint in bisection mode or the weighted secant point in AB mode, using the safeguards below. Test the current width at this safeguarded point x. If the width test passes, return x. Otherwise evaluate the actual function value there, reusing α or β if rounding has made x coincide with an endpoint. A machine zero terminates the iteration; NaN gives an invalid-result status.
  • In bisection mode, evaluate (11) from the actual endpoint values before replacement and the new midpoint residual. Non-finite residuals disable switching. If the test passes, the midpoint still replaces an endpoint as in bisection, but this replacement is recorded as the first step of the new AB phase.
  • Before replacing an endpoint in an AB step, save R t − from the actual pre-update endpoint values. For either kind of step, identify the endpoint whose actual function value has the same nonzero sign as the new residual. In an AB step, if that endpoint was also replaced on the preceding step of the phase, the switching bisection being its first step, multiply the retained modified ordinate by the factor in Section 2; replace a nonpositive or non-finite computed factor by 1 / 2 . In both bisection and AB steps, replace the identified endpoint and assign the new value of the function both as its actual value and as its modified ordinate. In an AB phase, record which endpoint was replaced. The actual function value at the retained endpoint remains unchanged.
  • After an AB update, first test W t ≤ T t . If it passes, reset the exception counter. Otherwise allow continuation only if | f ( x t ) | < η R t − and the counter is below M, incrementing the counter in this case. If neither condition permits continuation, select bisection, restore ( u , v ) = ( α , β ) and clear the side record. Halve the threshold only for a continuing phase. After a switching bisection, start a phase with threshold B W c , counter zero and the side record set to the endpoint replaced by that bisection.
  • Repeat up to the iteration limit of MaxIterations loop visits. After the last allowed visit, test the width once more at the safeguarded midpoint. If this test also fails, return a maximum-iterations status rather than a successful root.
Sign comparisons and termination at a computed zero use only the actual function evaluations. Comparing signs directly avoids forming a residual product that might overflow or underflow. The function is evaluated through a wrapper local to each invocation, but the C# property EvaluationCount remains a shared counter. The local callback prevents nested or parallel calls from replacing the function being evaluated; it does not make that shared count a reliable per-call result under concurrency. The revised benchmark therefore counts evaluations in its own local wrapper. An endpoint residual reused from storage is not a new function evaluation.

5.3. Floating-Point Safeguards

Let Ω be the largest finite binary64 number. For nonzero finite modified ordinates set A = | u | and B = | v | and evaluate the secant as
x = B A + B a + A A + B b .
If max ( A , B ) ≥ Ω / 4 , first divide both magnitudes by their maximum. If the magnitudes or denominator are unusable, or the final weighted sum is non-finite, use the midpoint instead. Compute that midpoint as a / 2 + b / 2 , then project the result onto [ a , b ] . The secant result is projected in the same way. Even the midpoint needs this last check: separately halving two equal smallest positive subnormal endpoints rounds both halves to zero.
The switching factor can be evaluated from the magnitudes of the actual endpoint values as
k = 1 − | β | − | α | 2 ( | α | + | β | ) 2 .
Normalize these magnitudes by their maximum when it is at least Ω / 4 . Form the chord midpoint as α / 2 + β / 2 . When either magnitude in (11) is at least Ω / 4 , divide the midpoint residual and chord value by their common maximum before comparing the two sides. The comparison remains strict.
After an AB multiplication, a modified ordinate that underflows to zero is replaced by the smallest positive subnormal number with its previous sign; an infinite product is replaced by the corresponding signed value Ω . These replacements affect only the interpolation ordinates. They do not correct errors in function evaluation or establish the sign of the underlying real-valued function.
The implementation used in Section 7 evaluates the switching expression in the distributed form of Section 5.4, with a finiteness check on f 2 − f 1 instead of normalization, halves both secant magnitudes when their sum overflows instead of normalizing them at Ω / 4 , and projects the weighted secant onto the bracket. It retains the direct midpoint a / 2 + b / 2 , the direct width comparison, the plain AB multiplication without replacement of an underflowed modified ordinate, and the iteration-limit return without the additional final-width check. The projection of a subnormal midpoint and the overflow-aware width comparison described here are further safeguards from the earlier review, not changes silently inserted into that experiment. The reported ordinary-scale cases do not validate these extreme-value paths.
The two earlier stored variants differ when an AB step returns an infinite true residual. The commented ModAB3C skips the AB rescaling for that step, updates the bracket using signs of the actual function values, restores the modified ordinates, and forces the next step to be bisection. The simplified ModAB3 may retain that value while its AB rule remains active; an unusable secant then produces a midpoint through the shared helper. The revised implementation used in Section 7 behaves like ModAB3 in this respect. The two variants therefore need not give bitwise identical results in these exceptional cases. Infinite actual function values lie outside Assumption 1, so this difference does not change the exact-arithmetic convergence result.

5.4. Evaluation of the Switching Expression

A later implementation snapshot, commit 51a6d1b [13], and the revised implementation used in Section 7 evaluate the right-hand side of (11) in distributed form,
k | y m |   +   k | y 3 | ,
and retain a finite-value check on f 2 − f 1 before attempting the switch. Opposite signs prevent overflow in f 1 + f 2 for finite inputs but not in f 2 − f 1 . If the latter is non-finite, the implementation remains in bisection mode. Lemma 1 bounds the exact distributed expression by H = max ( | f 2 − f 1 | , | y 3 | ) . The rounding-error estimates in Section 5.5 distinguish the accuracy of this distributed evaluation from a uniform guarantee for a scaled variant.
In floating-point arithmetic, the equivalent expression k ( | y m | + | y 3 | ) can behave differently: the sum in parentheses may overflow before multiplication by k reduces its magnitude. With Ω = double . MaxValue and
f 1 = − Ω / 4 , f 2 = 3 Ω / 4 , y 3 = Ω ,
the C# check gives approximately 1.2640029854500657 · 10 308 for the distributed expression and Infinity for the grouped one. These values were obtained with the C# implementation described in Section 7.
The same distinction between exact algebra and evaluation order applies to a weighted secant. A convex-combination formula is bounded in exact arithmetic, but its independently rounded weights need not sum to exactly one. In the later snapshot, projection onto the finite bracket also handles an infinite weighted sum. For example, magnitudes A = 1 , B = 2 − 53 and endpoints a = 3 Ω / 4 , b = Ω give an infinite raw weighted sum in the C# check, and projection returns b. This calculation illustrates the role of projection in that particular case, but it does not establish correctness for all exceptional inputs.
The arithmetic simplifications concern the evaluation of each step, whereas the bound on consecutive exceptions concerns convergence of the intervals. The revised implementation keeps the simplified arithmetic, restores that bound and uses the strict residual inequality. The additional midpoint and interval-width safeguards are separate.

5.5. Rounding Errors in the Switching Criterion

The cubic estimate concerns the exact value of the switching expression. To study its evaluation, we regard the supplied binary64 numbers f 1 , f 2 , f 3 as exact input data, with f 1 f 2 < 0 and all three values finite. Here f 3 denotes the computed midpoint residual. Errors already present in these function evaluations are not included in the following bounds. Thus the comparison to be reproduced is
L < R , L =   | f 3 − y m | , R = k ( | y m |   +   | f 3 | ) ,
where D , y m , v , k are defined by (12).
We assume binary64 arithmetic with rounding to nearest, ties to even, and gradual underflow. Write fl for a single correctly rounded operation, and put
ϵ = 2 − 53 , ω = 2 − 1074 , γ j = j ϵ 1 − j ϵ .
The indicated order of operations is part of the analysis and intermediate results are rounded to binary64, without reassociation or replacement of separate operations by fused operations. These are the usual rounding assumptions [14,15,16].

5.5.1. The Unscaled Distributed Expression

Consider the evaluation
D ^ = | fl ( f 2 − f 1 ) | , y ^ = fl fl ( f 1 + f 2 ) / 2 , v ^ = fl ( | y ^ | / D ^ ) , r ^ = fl ( 1 − v ^ ) , k ^ = fl ( r ^ 2 ) , L ^ = | fl ( f 3 − y ^ ) | , R ^ = fl fl ( k ^ | y ^ | ) + fl ( k ^ | f 3 | ) .
As in the implementation described above, a non-finite D ^ precludes switching.
Proposition 4 (Error bound when the relative rounding model applies).
Suppose no operation in (45) overflows, and every nonzero exact intermediate result lies in the normal range. With H = max ( D , | f 3 | ) ,
( R ^ − L ^ ) − ( R − L ) ≤ 16 ϵ H .
The subtraction R ^ − L ^ in this bound is an exact subtraction of the two computed numbers. In particular, the comparison L ^ < R ^ agrees with L < R whenever | R − L | > 16 ϵ H .
Proof. 
Under the stated assumptions, division of the rounded sum by two is exact, and
| y ^ − y m |   ≤   ϵ | y m | , | v ^ − v |   ≤ γ 3 v ≤ γ 3 / 2 .
The quotient estimate accounts for the rounded endpoint sum, endpoint difference and division. It follows by bounding the relative factor ( 1 + δ 1 ) ( 1 + δ 3 ) / ( 1 + δ 2 ) , where | δ i |   ≤ ϵ . If y m = 0 , the corresponding quantities are zero and the estimate remains valid.
The subtraction defining r ^ and the subsequent square give
k ^ − ( 1 − v ^ ) 2 ≤ γ 3 .
Indeed, their relative factor contains the rounding error of the subtraction twice and that of the multiplication once. Since 0 ≤ v ≤ 1 / 2 and 0 ≤ v ^ < 1 , both 1 − v and 1 − v ^ belong to [ 0 , 1 ] . Therefore
| k ^ − k |   ≤ γ 3 + 2 | v ^ − v | ≤ 2 γ 3 .
Also 0 ≤ k ^ ≤ 1 . For the left-hand side,
| L ^ − L |   ≤ ϵ | f 3 − y ^ |   +   | y ^ − y m |   ≤ 2 ϵ + ϵ 2 2 H .
For the right-hand side, the two rounded products and their rounded sum differ from k ^ ( | y ^ |   +   | f 3 | ) by at most γ 2 k ^ ( | y ^ |   +   | f 3 | ) . Hence
| R ^ − R |   ≤ 3 + ϵ 2 γ 2 + 3 γ 3 + ϵ 2 H .
Adding the last two estimates gives
( R ^ − L ^ ) − ( R − L ) ≤ 3 + ϵ 2 γ 2 + 3 γ 3 + 5 ϵ + ϵ 2 2 H < 16 ϵ H .
This proves the bound and the assertion about the strict comparison.    □
The normal-range assumption matters. For example, let f 1 = − ω , f 2 = 2 ω and f 3 = ω . In exact arithmetic,
y m = ω / 2 , v = 1 / 6 , k = 25 / 36 , R − L = 13 ω / 24 > 0 .
In (45), however, y ^ = 0 because the tie ω / 2 rounds to zero. Consequently k ^ = 1 and L ^ = R ^ = ω : the computed comparison declines a switch that the exact comparison permits. The exact cubic bound therefore does not imply agreement of the two decisions. Nor does Proposition 4, which assumes that overflow has not occurred, prove its absence at the largest input magnitudes.

5.5.2. A Scaled Evaluation Valid Throughout the Finite Range

Both restrictions can be avoided by evaluating the symmetry factor and the two sides with separate scales. Let
ρ = min ( | f 1 | , | f 2 | ) max ( | f 1 | , | f 2 | ) , s = max ( | f 1 | , | f 2 | , | f 3 | ) , p i = f i s , h = p 1 + p 2 2 .
These definitions use exact real arithmetic. Since the endpoint values have opposite signs,
v = 1 − ρ 2 ( 1 + ρ ) , k = κ ( ρ ) : = 1 + 3 ρ 2 ( 1 + ρ ) 2 .
The exact normalized difference is
G = k ( | h |   +   | p 3 | ) − | p 3 − h | = R − L s .
Thus G > 0 is precisely the original switching condition.
Compute the factor in the following order:
ρ ^ = fl min ( | f 1 | , | f 2 | ) max ( | f 1 | , | f 2 | ) , a ^ = fl ( 1 − ρ ^ ) ,         b ^ = fl ( 1 + ρ ^ ) , v ˜ = fl a ^ / 2 b ^ ,         r ˜ = fl ( 1 − v ˜ ) ,         k ˜ = fl ( r ˜ 2 ) .
Next compute
p ^ i = fl ( f i / s ) ,         h ^ = fl fl ( p ^ 1 + p ^ 2 ) / 2 , L ˜ = | fl ( p ^ 3 − h ^ ) | ,         R ˜ = fl fl ( k ˜ | h ^ | ) + fl ( k ˜ | p ^ 3 | ) , G ^ = fl ( R ˜ − L ˜ ) .
The maximum defining s selects an input magnitude and requires no rounding. The endpoint scale in (49) prevents the denominator of the symmetry ratio from vanishing when | f 3 | is much larger than both endpoint magnitudes.
Theorem 3 (A uniform rounding bound for the scaled comparison).
For all finite binary64 inputs with f 1 f 2 < 0 , the operations in (49)–(50) produce finite values and have no zero divisor. Under the rounding assumptions stated above, including gradual underflow,
| k ˜ − k |   ≤ 8 ϵ , | h ^ − h |   ≤ 3 ϵ , | G ^ − G |   ≤ 25 ϵ .
No lower bound on the nonzero input magnitudes is necessary.
Proof. 
First observe that rounding any real number in [ − 2 , 2 ] to binary64 introduces absolute error at most ϵ . The largest spacing below 2 is 2 − 52 = 2 ϵ ; subnormal spacing is smaller. This absolute bound therefore remains valid when relative error estimates fail near zero.
The computed ratio satisfies 0 ≤ ρ ^ ≤ 1 . Consequently,
0 ≤ a ^ ≤ 1 , 1 ≤ b ^ ≤ 2 , 0 ≤ v ˜ ≤ 1 / 2 , 1 / 2 ≤ r ˜ ≤ 1 , 1 / 4 ≤ k ˜ ≤ 1 .
Division of a ^ by two is exact: either a ^ = 0 , or ρ ^ < 1 and a ^ ≥ 2 − 53 . Thus all operations defining the factor are finite and their divisors are positive.
To bound its error, note that
κ ′ ( ρ ) = 1 + 3 ρ ( 1 + ρ ) 3 , 0 < κ ′ ( ρ ) ≤ 1 ( 0 ≤ ρ ≤ 1 ) .
Since | ρ ^ − ρ |   ≤ ϵ , replacing ρ by ρ ^ changes κ by at most ϵ . For this fixed ρ ^ , put a = 1 − ρ ^ , b = 1 + ρ ^ and v 0 = a / ( 2 b ) . The rounding bounds give | a ^ − a |   ≤ ϵ and | b ^ − b |   ≤ ϵ , while b , b ^ ≥ 1 . Hence
a ^ 2 b ^ − a 2 b ≤ | a ^ − a | 2 b ^ + a | b ^ − b | 2 b b ^ ≤ ϵ .
Rounding the division adds at most ϵ , so | v ˜ − v 0 |   ≤ 2 ϵ . Rounding the next subtraction gives | r ˜ − ( 1 − v 0 ) |   ≤ 3 ϵ . Both quantities, being squared, lie in [ 0 , 1 ] , and therefore
| k ˜ − κ ( ρ ^ ) |   ≤ 2 ( 3 ϵ ) + ϵ = 7 ϵ .
Combining this with the perturbation of ρ proves the first bound.
Each normalized input satisfies | p i |   ≤ 1 and | p ^ i − p i |   ≤ ϵ . Rounding preserves the opposite endpoint signs, except that a sufficiently small normalized endpoint may become zero. In either case, | p ^ 1 + p ^ 2 |   ≤ 1 and | h ^ |   ≤ 1 / 2 . The endpoint divisions, the addition and the halving therefore give
| h ^ − h |   ≤ ϵ + ϵ + ϵ 2 + ϵ ≤ 3 ϵ .
The last ϵ also covers a subnormal halving.
Write L s = | p 3 − h | and R s = k ( | h |   +   | p 3 | ) . The subtraction for the left-hand side gives
| L ˜ − L s |   ≤ ϵ + 3 ϵ + ϵ = 5 ϵ .
For the two products on the right-hand side, use | p 3 |   ≤ 1 , | h | ≤ 1 / 2 and k ˜ ≤ 1 :
fl ( k ˜ | p ^ 3 | ) − k | p 3 | ≤ ϵ + ϵ + 8 ϵ = 10 ϵ , fl ( k ˜ | h ^ | ) − k | h | ≤ ϵ + 3 ϵ + 4 ϵ = 8 ϵ .
The rounded sum contributes at most another ϵ , giving | R ˜ − R s |   ≤ 19 ϵ . All these exact intermediate results have magnitude at most 2: the products are bounded by 1 and 1 / 2 , respectively, and both sides of the comparison are at most 3 / 2 . Thus the absolute rounding bound applies throughout, and no overflow is possible. Finally, rounding their difference contributes at most ϵ :
| G ^ − G |   ≤ 19 ϵ + 5 ϵ + ϵ = 25 ϵ .
   □
Corollary 3 (A sufficient condition for a reliable switching decision).
With the scaled evaluation above,
G ^ > 32 ϵ = 2 − 48 ⟹ L < R .
Likewise, G ^ < − 32 ϵ implies L > R . If neither inequality holds, retaining bisection avoids an uncertified switch. Every input with G > 57 ϵ is accepted by (52), and every input with G < − 57 ϵ is certified as not satisfying the exact switching inequality.
Proof. 
Theorem 3 gives G ≥ G ^ − 25 ϵ > 7 ϵ > 0 in the first case, and the analogous negative bound in the second. Conversely, G > 57 ϵ implies G ^ > 32 ϵ , and similarly for the negative case.    □
The number 2 − 48 ≃ 3.55 · 10 − 15 is a dimensionless rounding margin, not a residual tolerance or a stopping tolerance for the root. The constants are conservative bounds, not estimates of typical error. In the subnormal example above, the exact scaled difference is G = 13 / 48 , so the scaled rule accepts the switch. Near equality, however, a strict comparison can change under rounding even when every intermediate result is normal.
A reference evaluation in exact rational arithmetic, described in Supplementary Material S1 (file: Supplementary_S1_Formal_Verification.pdf), confirmed all five bounds used in the proof and the certified decisions on test inputs concentrated near the switching boundary. Such finite checks supplement, but do not replace, the proofs above.
The scaled rule preserves the mathematical convergence argument because this argument does not require a particular switching criterion. Section 7.3 compares it with the benchmarked evaluation on the full test set and under exact rescaling of the test functions by powers of two, and gives the location of its C# code. It does not certify the signs or accuracy of the supplied function values, and it does not extend the exact-arithmetic convergence theorem to arbitrary floating-point function evaluations.

5.6. Machine Zeros and Interval-Width Termination

In binary64 arithmetic, evaluation of the supplied expression defines a computed function F ^ . Its exact zero need not be a zero of the real expression f, and a real zero need not evaluate to machine zero. This distinction is standard in floating-point error analysis [14,15,16]. The two stopping conditions are
F ^ ( x ) = 0 or b − a ≤ ε abs + ε rel | x | .
The candidate must already be finite and inside [ a , b ] before its magnitude enters the relative tolerance.
If the directly computed width or tolerance overflows, compare instead
b 2 − a 2 ≤ ε abs 2 + ε rel | x | 2 ,
requiring a finite left-hand side. This prevents an erroneous acceptance based on ∞ ≤ ∞ . It is still an ordinary rounded comparison, not an interval-arithmetic certificate.
The geometric conclusion (42) requires the computed endpoint signs to agree with those of a continuous real function, and requires the width comparison not to round an insufficient width into an accepted one. A formally verified implementation would need validated function enclosures and conservative rounding. We do not claim these properties here.

5.7. Changes to the Comparison Methods and Compilation Corrections

We also corrected the implementation of Ridders’ method that we use for comparison. It uses the local callback, recognizes endpoint machine zeros, and rejects NaN both at the midpoint and at the subsequent trial point before either value enters a sign update. To protect the interpolation, let m be the midpoint, divide the three residuals by S = max ( | f ( a ) | , | f ( b ) | , | f ( m ) | ) , and denote the normalized values by α ˜ , β ˜ , γ ˜ . The trial point is
x R = m + ( m − a ) sign ( f ( a ) ) γ ˜ γ ˜ 2 − α ˜ β ˜ .
If the scale, radicand or final arithmetic is unusable, or the trial point reaches or leaves an endpoint, the already evaluated midpoint is used instead. The stopping test uses the whole bracket width rather than the distance between successive Ridders points. Known midpoint and endpoint residuals are reused, and the sign update retains an ordered bracket. These comparator changes do not enter the modAB convergence proof.
In the earlier patch the other solver files were adapted to the new Initialize signature by receiving the local wrapper through out F; those call-site edits did not alter their numerical formulas. The later build repair in ModAB3C removed a stale reference to the local Clamp and made the evaluation explicit as F(x3) before passing the value to Node(double,double). This resolves the obsolete-helper and constructor-interface issues without changing the mathematical update.

6. Formal Verification of Switching and Convergence

The principal mathematical results of this paper have been checked in Lean 4, using the real-number theory of mathlib and the floating-point definitions of FloatLib [17,18]. Version 0.5.0 of the accompanying formalization contains 380 lemmas and theorems (93 added to version 0.4.0). The source and verification records are supplied as ModAB.Switching.Lean, version 0.5.0 (fixed source revision) (https://github.com/Proektsoft-EOOD/ModAB-Root-Finding/tree/ea64a126c9a06294733086824da95a0eec808051/MDPI-Algorithms-Data-2/ModAB.Switching.Lean, accessed on 6 November 2026) [19]. Supplementary Material S1 contains the formal statements of the binary64 results, their proofs, and the records of the supporting numerical checks.

6.1. What Is Verified

In exact real arithmetic, the formalization covers the interval invariants (Proposition 1), the cubic bound (Lemma 1), the geometric bound for a continuing AB phase (Lemma 5), global convergence (Theorem 1) through the same two cases as in Section 4, the global width bound and finite termination (Theorem 2 and Corollary 2), the residual-to-distance estimate (43), and the two exact AB examples, including the counterexample of Proposition 3 for both initialization conventions. The top-convention trajectories are derived from their concrete secants and positive corrections in TopOneSided.lean and TopUncapped.lean. The additional η = 1 / 42 example in Section 7.4 is proved in Eta42.lean: this includes its closed form, quadratic point convergence, width limit one, indefinite uncapped continuation, and fallback after the sixth true chord when M = 3 . The initialization bridge in TopEntry.lean establishes the recorded side, working-sign preservation, and the unchanged phase-width policy. In binary64 arithmetic, it covers the error bound of Proposition 4 under its normal-range and no-overflow assumptions, and the complete statement for the scaled comparison: for all finite binary64 inputs with f 1 f 2 < 0 , every intermediate result is finite and every divisor positive, the computed difference satisfies | G ^ − G | ≤ 25 ϵ , and the guarded comparisons with ± 2 − 48 imply the exact switching decision (Theorem 3 and Corollary 3). Rounding is defined explicitly, and the operations on binary64 representations are proved to produce the values of that rounding map. The local error bounds are therefore conclusions of the proof, not assumptions.

6.2. Assumptions

The binary64 results assume IEEE 754 rounding to nearest, ties to even, with gradual underflow, and separate rounding of every operation in the stated order, without reassociation or fused operations. The supplied function values are treated as exact input data. An audit of all 380 lemmas and theorems confirms that they contain no unfinished proofs and depend only on the standard axioms of propositional extensionality, quotient soundness and classical choice.

6.3. Correspondence with the Implementation

A source translator records the 17 arithmetic operations of the C# scaled comparison as a Lean expression, whose equality with the verified expression is then checked. The translator is inspected, not formally verified. The variant SgModABScaled in the repository evaluates the same 17 operations in the same order. Separate tests on the recorded execution environment (.NET 10.0.12, Linux x64) compared the native operations with independently computed correctly rounded results and found complete agreement; they are described in Supplementary Material S1.

6.4. What Is Not Covered

The formalization does not verify the complete floating-point root-finding loop, the C# compiler, the .NET runtime or the processor, nor the accuracy or signs of the supplied function values. It therefore does not extend the exact-arithmetic convergence theorem to floating-point computation. For the unscaled switching expression, only the rounded-real error bound under its stated assumptions is verified, not its native execution.

7. Numerical Experiments and Reproducibility

7.1. Independent Assessment of the Root Approximations

Consider f p ( x ) = x p − 10 − 3 on [ − 10 , 10 ] , with p odd. For p = 13 , 15 , 17 , the positive roots are approximately 0.588 , 0.631 , and 0.666 . Yet a false-position trial point can move so little near an endpoint that a step-based test stops far from all three roots. In this case, the small difference between successive approximations is caused by stagnation. The length of the interval remains large because the other endpoint is fixed, so a stopping condition based on that length does not give the same premature termination.
A residual test has a different limitation. Multiplying the equation by a small positive constant leaves its roots unchanged but makes every residual smaller. In floating-point arithmetic the rescaled expression may even underflow to zero away from a mathematical root. For example, a callback evaluating 10 − 320 ( x − 1 4 ) 3 can return zero at x = 0.26 , although the horizontal error is 0.01 . A separate accuracy check based on the same computed zero would inherit this error and would provide no independent information about the distance to the root.
For a supplied reference set Z i within the initial interval, the revised benchmark checks
e x , i = min z ∈ Z i | x ^ i − z | ≤ ε abs + ε rel | x ^ i | .
It rejects non-finite and out-of-interval answers and does not accept F ^ i ( x ^ i ) = 0 as a substitute for this test. The benchmark call passes both requested tolerances explicitly. The validator IsRoot(x,aTol,rTol) of the benchmark in the accompanying source bundle retains an absolute-only default for the optional third argument, so legacy two-argument calls are not silently reinterpreted. It checks finite non-negative tolerances, finite bounds and candidates, and usable reference roots inside the initial interval. A null or empty reference list cannot validate a result. Non-finite tolerance arithmetic is conservatively rejected; the validator does not evaluate the callback. The reference roots are numerical approximations, not interval enclosures; their accuracy and completeness must therefore be audited before interpreting the resulting classifications as more than reference-based validation. In particular, a benchmark must not reject a different valid root just because its reference list is incomplete.

7.2. Function Evaluation Counts and Classification of Test Problems

The validation and counting rules in this subsection are a further benchmark revision. In the earlier implementation snapshot, Problem.IsRoot could still accept a callback zero after failing its reference-distance test. That fallback is excluded here; the benchmark corrections should not be confused with the eight modAB changes in Table 3.
Actual callback evaluations are counted by a wrapper local to each benchmark invocation. Solver return status is preserved separately from the reference-based validation status. A failed validation does not overwrite the measured count. The output includes both the raw count and an explicitly labeled penalized score. The score replaces the count of every run that fails validation by a common penalty, one larger than the largest observed raw count among the reference-eligible cases in that run. Thus a method that terminates after only two or three evaluations with an inaccurate approximation is not ranked ahead of a successful method. The penalized score is a scoring convention only: it is not an evaluation count, it is reported in a separate row, and no conclusion of this paper is based on it. All other figures are raw counts.
The broader development benchmark contains 101 cases, including the counterexample (27) as f101. Table 4 shows how they are grouped for the aggregates of Section 7.3. Eight cases have no zero with a sign change in their initial interval and are excluded from all sums. Of the remaining 93 reference-eligible cases, the validator rejects three for every variant; the other 90 form the common validated set. Three of these are stress cases: they are deliberately discontinuous or have a singular endpoint. Such cases can expose implementation behavior, but they are not tests of the convergence theorem under Assumption 1. In particular, the sawtooth cases have jumps through zero that are not roots; a narrow interval straddling such a jump is not a root-containing bracket. Removing them leaves 87 validated non-stress cases.
The controlled comparison below uses the benchmark definitions in the accompanying source bundle. Separate explicit examples document the proof mechanism and the machine-zero failures, so these particular checks do not require the whole collection.
Table 4. Classification of the 101 test cases used in the aggregates of Section 7.3. Each row below the first is a subset of the preceding subset.
Table 5. Computed zeros rejected by the corrected reference validator. All three rules return these same inaccurate values.

7.3. Comparison of the Rules for Returning to Bisection

The comparison uses the revised C# implementation SgModAB in the accompanying Revision2 source bundle [19]. We compiled Release with .NET SDK 10.0.114, runtime 10.0.14, on Ubuntu 24.04 x64, using binary64 values, ε abs = ε rel = 10 − 14 and an iteration limit of 200 loop visits. Three variants share the same arithmetic and switching convention and differ only in the phase-entry threshold and exception cap: fixed delay ( B , M ) = ( 16 , 0 ) , early fallback ( 2 , 0 ) , and adaptive fallback ( 2 , 3 ) with η = 1 / 42 . The 101 cases consist of the 100 functions of the earlier collection and the counterexample (27) (f101). The fixed-delay variant reproduces the returned values and evaluation counts of the 2026 implementation [10], as corrected by L. Tomov, on all 101 cases. Function evaluations are counted by a local wrapper; validation does not call that wrapper or the function. The counts depend on the platform only through the library functions used in the test functions. On Windows 11 (.NET 10.0.12), Math.Cos, Math.Sin, Math.Cbrt and Math.Pow round some values differently, which changes the counts of f34, f65 and f70 by − 1 , + 1 and + 1 for both the 2026 and the revised implementation. The benchmark output in the repository, obtained on Windows, therefore reports one evaluation more for each of them (1967 instead of 1966 per suite); all differences between the implementations are unchanged.
The subsets are those of Table 4. The validator rejects f27, f29 and f75 for all three variants; their 53 measured evaluations in total are retained in the raw 93-case sum but not counted as successful work. The same 90 cases pass for all variants. This classification does not replace a full audit of all remaining function and reference definitions. The largest observed raw count on the 93 cases is 78 (f101 with the fixed delay), so the penalty used for the penalized score is 79.
Relative to the fixed-delay version, and hence to [10], the adaptive rule reduces the total from 1704 to 1679 function evaluations (1.5% on the 93 reference-eligible cases) without increasing the count on any case. Over all 101 named cases, the corresponding totals are 1991 and 1966, a reduction of 1.3%. The reduction is confined to the odd-power cases f92–f97, three evaluations each, and to f101, seven evaluations. The early fallback also needs 1704 evaluations. It differs from the adaptive rule only on f13, f18, f32, f37, f47, f64, f69 and f84, which are exactly the cases in which residual exceptions are granted. Neither the controlled result nor the aggregate supports a universal ranking of the methods.
Counting the switching bisection as the first step of the AB phase (Section 2) changes the count only when the first AB step replaces the same endpoint as that bisection. Compared with a variant in which the first AB step is never rescaled, it lowers the count in 19 cases and raises it in 6, including f101 (71 instead of 65), a net change of − 10 evaluations. In a separate seeded sample of 200,000 functions from ten equally represented families, top switching used 4,877,867 evaluations and bottom switching 4,904,206, a saving of 0.54%. This experiment allowed 1000 new function evaluations after initialization and at most 2000 loop visits; all runs passed validation. With the 200-visit limit used in the main benchmark, top switching had one limit exit and bottom switching four. The sample therefore supports a modest aggregate preference, not pointwise dominance or a universal reliability claim.
In the benchmark definitions,
f 64 ( x ) = tan ( x − 0.1 ) , [ a 0 , b 0 ] = [ − 1 , 1 ] ,
f 84 ( x ) = ∏ j = 1 5 ( x − j ) − 0.05 , [ a 0 , b 0 ] = [ 0.5 , 5.5 ] .
Both observed AB phases approach simple roots. At AB steps 3 and 4, f64 keeps width approximately 0.9 , while its residual falls through 9.56 · 10 − 7 and 1.23 · 10 − 12 (Figure 2). The fifth AB step replaces the far endpoint, leaving width 1.23 · 10 − 12 , and the next evaluation is a machine zero. For f84 the corresponding width stays near 2.4875 , while the residual falls through 3.70 · 10 − 8 and 5.03 · 10 − 14 . The fifth AB update then replaces the far endpoint, leaving width 1.29 · 10 − 14 .
Figure 2. First AB phases for f64 and f84. Width and residual are normalized by their values at phase entry. The shaded region marks two residual exceptions. The zero at step 6 of f64 is annotated rather than assigned an artificial positive logarithmic value.
The early fallback on f84 also changes the zero being approached. After its third AB step the bracket is approximately [ 3.0125024 , 5.5 ] . The following midpoint, 4.2562512 , has negative residual, so replacing the left endpoint excludes the nearby zero 3.01250244 … The remaining search converges to 5.00207436 … The retained interval still contains a zero, as required, but it no longer contains the zero approached by the preceding AB steps. The odd-power cases are different: in their initial flat region the smaller endpoint residual magnitude scarcely decreases, so the adaptive rule returns to bisection without granting exceptions.

7.3.1. The Scaled Switching Rule

To evaluate Corollary 3 in the same setting, the switching decision of each variant was replaced by G ^ > 2 − 48 , computed by (49)–(50) whenever f 1 , f 2 and f 3 are finite; all other parts of the iteration were left unchanged. With the scaled decision, 100 of the 101 cases give bitwise identical roots, evaluation counts and return codes for all three variants (Table 6). The exception is f97, f ( x ) = x 13 − 10 − 3 on [ − 10 , 10 ] . Its first switching test has f ( ± 10 ) = ± 10 13 − 10 − 3 and f ( 0 ) = − 10 − 3 , and the exact normalized difference (48) is G ≈ 1.80 ϵ . The unscaled rule switches, in agreement with the exact comparison; the scaled rule leaves the decision uncertified and keeps bisection. Both return the same binary64 approximation, after 18 evaluations instead of 21 (24 for the fixed delay). The validation outcomes are unchanged.
Table 6. Function evaluations with the unscaled and the scaled switching decision. The remaining 100 cases are identical. The penalized score uses the same penalty of 79 and is not a count.
All 1077 switching tests of the adaptive run were also compared with the exact rational value of (11). Two tests (f100) have an infinite endpoint value and are declined by both rules. In the remaining 1075 tests the nonzero function values lie between 7.1 · 10 − 102 and 2.7 · 10 18 ; no operation of the benchmarked switching expression overflowed, and no exact intermediate result was nonzero and smaller than 2 − 1022 . Thus neither overflow nor underflow occurred in the switching test on this benchmark, and the benchmarked decision agreed with the exact comparison in every test. The scaled rule never contradicted the exact comparison. It left 73 tests uncertified: 71 with exactly opposite endpoint values, where L = R and both rules reject the strict inequality, one on f08 with G ≈ − 0.5 ϵ , and the f97 test above.
These ordinary-scale cases cannot exercise the overflow and underflow paths. Therefore each test function was also multiplied by 2 k , − 1070 ≤ k ≤ 1022 . A case was retained for a given k only if every finite callback value was scaled exactly; the iteration in exact arithmetic is then unchanged. With the scaled rule, every retained case reproduced its k = 0 returned root bits, evaluation count and status for every sampled k ≥ − 900 . The recorded outputs do not establish equality of every intermediate point. The distributed expression (45) changed the recorded outputs in eight cases for 1000 ≤ k ≤ 1022 (f34, f35, f50, f70, f79, f82, f94, and f101). In each of them f 2 − f 1 overflows, and the finiteness check declines a switch that the scaled rule certifies. The counts changed in both directions; for example, f101 terminated after 4 instead of 71 evaluations because bisection reached x = 0 exactly. For k ≤ − 1000 only four cases changed (f67, f78, f79, and f81), identically for both rules. This experiment illustrates Theorem 3 on the tested power-of-two scalings. Lemma 1 bounds the exact right-hand side of the distributed test; that bound alone does not rule out overflow of its rounded evaluation. The unscaled rounding bound requires the normal-range and no-overflow hypotheses of Proposition 4. The exact-arithmetic convergence proof permits either switching decision but does not certify a floating-point bracket when function signs or other solver operations are inaccurate.

7.3.2. Choice of the Switching Test in the Implementation

The C# code of the scaled variant is available as SgModABScaled in the directory MDPI-Algorithms-Data-2/Root/Solvers of the repository at the accompanying source bundle. It differs from SgModAB only in the switching test. On the benchmark it changes a single decision (f97), and in the 2 k experiment it differs only where f 2 − f 1 overflows. Its 17 operations, four of them divisions, nevertheless add to every switching test: in a separate run with fully optimizing compilation in the Linux environment described below, the time per suite rose by about 8 % (from 59.8 to 64.5 μ s in that run), which the three saved evaluations do not offset in that measurement. The simpler unscaled test is retained as an empirical implementation choice; all other benchmark results refer to it. The scaled variant supplies the proved decision guarantee over the finite binary64 range, including subnormal intermediate values. Neither choice verifies the rest of the floating-point solver.

7.3.3. Execution Time

The 101-case suite was timed with BenchmarkDotNet 0.15.8 for the 2026 implementation and for the revised one on an Intel Core i7-1065G7 processor (Windows 11, .NET 10.0.12). The mean times per suite were 59.31 ± 0.37 μ s and 57.76 ± 0.32 μ s (standard deviations), that is, 29.8 and 29.4  ns per function evaluation including solver overhead. As a second environment, interleaved rounds on one core of an Intel Xeon processor at 2.1 GHz (Linux, .NET 10.0.14; 41 rounds of 20 suites after a warm-up) gave median times of 58.96 and 58.66 μ s with fully optimizing compilation. Their interquartile intervals were [ 58.45 , 59.88 ] and [ 57.80 , 59.44 ] μ s. With default tiered compilation, the medians were 54.73  and 54.80 μ s and the intervals [ 53.52 , 71.43 ] and [ 53.48 , 60.03 ] μ s. The tiered measurements have appreciably greater dispersion. The suite uses 1.3% fewer evaluations (1966 rather than 1991), while the reported timings are similar or modestly lower. These measurements do not establish a universal saving in wall-clock time or isolate the cost of each safeguard. For sufficiently costly callbacks, function evaluation may dominate total cost. No general speed advantage is claimed.

7.4. A Numerical Example Requiring the Bound on Residual Exceptions

To examine the bound on consecutive exceptions in the implementation, the counterexample (27) was solved with the revised implementation for both residual factors, with the bound M = 3 and without a bound. Table 7 gives the results; counts include the two initial endpoint evaluations.
Table 7. C# results for the C 1 counterexample on [ − 3 , 1 ] . With η = 1 / 2 , restoring the exception cap changes termination; with η = 1 / 42 , no residual exception is granted on this function.
With η = 1 / 2 , the uncapped implementation exhausts the 200 loop visits, each completing a bracket update, and returns NaN. With the cap, the returned point is approximately − 6.40 · 10 − 16 and the final width is 5.51 · 10 − 15 . The trace contains 75 completed bracket updates followed by a width-based exit on the next loop visit so that 77 = 75 + 2 evaluations are used. The first forced fallback occurs after the sixth AB step: steps 3, 4 and 5 have consumed the three permitted residual exceptions.
With η = 1 / 42 , no exception is granted on this function: from the third AB step onward the residual ratio lies between 0.38 and 0.43 , well above 1 / 42 . Both versions return to bisection at the first missed width threshold and terminate after 71 evaluations, six fewer than with η = 1 / 2 and the cap. The smaller residual factor improves this example, but its behavior at η = 1 / 2 alone does not prove that a cap is needed at η = 1 / 42 . The width-bound proof retains a finite M, independently of η .

7.4.1. A Direct Counterexample at η = 1 / 42

Consider
f ( x ) = x , x ≤ 0 , x + x 2 / 10 , x > 0 , [ a 0 , b 0 ] = [ − 3 , 1 ] .
This function is C 1 , strictly increasing and has the unique simple root zero. The first midpoint − 1 passes the switching test. With top switching, the first actual chord gives x 1 = − 1 / 21 and the right modified ordinate 22 / 21 . The calculation in Proposition 2 gives
x n = − e n , e n + 1 = e n 2 1 + 2 e n , e n = 1 22 2 n − 1 − 1 , W n = 1 + e n ⟶ 1 .
Here the initial post-bisection width is S = 2 . The first failed width comparison is at chord step 3, with threshold 1, and all later comparisons also fail. Nevertheless, for every n ≥ 3 ,
| f ( x n ) | min ( | f ( a n − 1 ) | , | f ( b n − 1 ) | ) = e n e n − 1 ≤ 1 485 < 1 42 .
Consequently, without the cap every failed width test receives an exception in exact arithmetic. The approximations converge quadratically to the root, but width-based stopping never occurs for a tolerance below one. With M = 3 , steps 3–5 consume the allowance and step 6 ends the AB phase; the next step is bisection. This example concerns the width certificate, not failure of point convergence or an assertion that the binary64 run must fail. All these exact-arithmetic claims, including the positive correction at every step and the six-step capped schedule, are checked in Eta42.lean. Its tail index n = 0 denotes the first true chord; thus its closed form 1 / ( 22 2 n − 1 ) is the same formula with the index shifted by one.
In general, a loop visit either terminates at the width test without an evaluation, or evaluates the function once and then either terminates at a machine zero or NaN or completes a bracket update. If rounding makes the safeguarded trial point coincide with an endpoint, the stored function value is reused; this visit completes a bracket update that leaves the bracket unchanged and requires no evaluation. With V loop visits, c reused endpoint values, w = 1 for a width exit and e = 1 for any exit inside the loop (zero otherwise),
E = 2 + V − w − c , U = V − e ,
where U is the number of completed bracket updates. Tracing every loop visit confirmed (55) in all runs reported in this section (more than 2000 runs). In the 100 benchmark runs of the adaptive variant, endpoint values were reused 24 times in 19 cases, 42 runs ended at a machine zero, and 58 ended at the width test. Reuse makes the three counts differ by more than a constant: for f70, four trial points round onto an endpoint, giving U = 14 bracket updates with E = 12 evaluations.
Over the other 100 functions, the variants with M = 3 and without a bound give identical results for both residual factors. Replacing η = 1 / 2 by 1 / 42 changes no result on these 100 functions: every exception granted there with η = 1 / 2 has a residual ratio below  1 / 796 .

7.4.2. Sensitivity to the Residual Factor

The comparison was repeated for 53 values of 1 / η between 1.0001 and 10 6 , with M = 3 and without a bound. Every sampled η from 1 / 796.6 to 1 / 2.42 ≈ 0.41 gives the same results on all 101 cases for both bounds: 1679 evaluations on the 93 reference-eligible cases and 71 on the counterexample. The ends of this range have a simple interpretation. Above it, exceptions are granted on the counterexample, whose residual ratios at the width violations lie between 0.38 and 0.43 . This is linear decrease, not rapid one-sided convergence; with M = 3 the count varies between 67 and 80, and without a bound the run fails at every sampled η ≥ 1 / 2.3 . Below the range, exceptions that benefit the benchmark functions are refused because their residual ratios are all below 1 / 796 ; the sum rises to 1685 for η = 1 / 1000 and to 1705 at the sampled values η ≤ 10 − 5 . The value 1 / 42 , motivated by the binary64 range after (18), lies near the logarithmic midpoint of this range, 1 / 44 , with a margin of more than an order of magnitude on both sides. The results therefore do not depend on its exact value, and its optimality is not claimed.

7.4.3. Sensitivity to the Bound M

With B = 2 , the constant of Lemma 5 is C = 2 M + 2 and the bound of Corollary 2 uses q = M + 4 bracket updates per guaranteed halving. The value M = 3 is the only choice that gives C = 32 and q = 7 , the constants of the fixed-delay rule (20). To assess other values, the controlled comparison of Section 7.3 was repeated with B = 2 and the values of M in Table 8.
Table 8. Function evaluations for different bounds on consecutive residual exceptions ( B = 2 ). The sums use η = 1 / 42 and include f101. The last two columns give the counterexample (27) for both residual factors.
When the cap is removed, 92 of the 100 benchmark functions request no residual exception. Six (f13, f18, f32, f37, f47, f69) request one, and f64 and f84 request two consecutive exceptions, at AB steps 3 and 4. No case requests more, so the cap never forces a fallback with M ≥ 2 . A cap M ≤ 1 cuts these runs of exceptions short and costs evaluations: for M = 1 , f64 needs 11 instead of 9 evaluations, and f84 needs 17 instead of 8 because, as with the early fallback, the iteration leaves the zero 3.0125 … and converges to 5.0021 … ; M = 0 is the early fallback. Every M ≥ 2 leaves all 101 results unchanged. We recommend M = 3 with B = 2 as a default: it keeps the guarantee of the fixed-delay rule and allows one exception more than the longest run observed here. This does not establish that M = 3 is optimal for other classes of functions.

7.5. Independent Validation of Rounded Zeros

The validator of the earlier repository snapshot [20] ended with return F(x)==0 after its reference-distance test had failed. Removing that fallback changes three classifications in the C# comparison.
For f27, the evaluated expression is the expanded form of ( x + 1.11111 − 3 ) 4 sign ( x + 1.11111 − 3 ) and loses its small value by cancellation. For f29, exp ( ( x − 3 ) 5 ) − 1 rounds to zero before x is close enough to 3. For f75, cancellation occurs in
sign ( 3 x − 1 ) 1 − 1 − ( 3 x − 1 ) 2 / 81 .
The known root locations reveal the errors independently of the callback. The revised accuracy check identifies these inaccurate approximations. It leaves the computed values and the solvers’ termination at computed zeros unchanged.
In a previously reported separate test suite, the validator passed 26 C# checks covering these three cases, underflowed callback zeros, exact reference matches, reversed bounds, non-finite candidates, unavailable or unusable references, relative tolerance, invalid tolerances, and overflow. A callback that throws if invoked verifies that validation itself does not evaluate the function. Solver status, external validation status, and raw function counts remain separate fields in the record. The repository version in the accompanying source bundle implements this validator in Problem.IsRoot, passes both tolerances at its benchmark call, and reports raw counts, validation status and the penalized score separately; the experiment driver of Section 7.3 supplies the counts in Table 9.
Table 9. Bracket updates U, loop visits V and function evaluations E (calls of the supplied function, including the two initial endpoint evaluations) in the controlled C# comparison. Fixed and early variants change only the adaptive rule’s parameters. The subsets are defined in Table 4; the last row is a score, not a count.

7.6. Reproduction of the Analytical and Numerical Checks

Exact-rational calculations check the iteration bounds used in the proof. Floating-point examples examine the stopping conditions, the separation of actual and modified ordinates, and the arithmetic safeguards. These checks can be reproduced independently of the complete benchmark collection.
For the first check, normalize W 0 = 1 and use
C ∈ { 3 / 2 , 2 , 3 , 8 , 16 , 32 , 33 , 64 , 256 } , n = 1 , … , 300 .
The upper bounds on the interval length can be computed recursively. For each number of completed bracket updates, distinguish intervals obtained by bisection, intervals whose last AB step requires a return to bisection, and intervals within a continuing AB phase. In the last case, record separately for each phase length t the largest possible initial length s. Initially there is only the bisection case, with interval length 1. Halving the larger of the bounds in the first two cases gives the next bisection bound and the initial bound for a possible new AB phase.
After t steps, a continuing AB phase has interval length at most s min ( 1 , C / 2 t ) . If it continues for one more step, the corresponding bound is s min ( 1 , C / 2 t + 1 ) . The last AB step before a return to bisection may retain the preceding bound but only if that bound is strictly larger than C s / 2 t + 1 . When several sequences of bracket updates lead to the same case, retain the largest interval bound, or the largest s for the same phase length. Using exact rational arithmetic, compare the resulting largest bound after each bracket update with 2 − ⌊ n / ( ⌈ log 2 C ⌉ + 2 ) ⌋ . All 2700 inequalities held in the earlier check of the reference rule. That calculation concerns the geometric bound on interval length; Lemma 5 establishes its applicability to the adaptive method. These finitely many comparisons supplement the proof of the iteration bound.
For the floating-point tests, use
f p ( x ) = x p − 10 − 3 , [ a 0 , b 0 ] = [ − 10 , 10 ] , p ∈ { 3 , 5 , 7 , 9 , 11 , 13 , 15 , 17 } .
The unique real root is x p ∗ = 10 − 3 / p , and f p ′ ( x p ∗ ) = p ( x p ∗ ) p − 1 > 0 . These are high odd-degree problems with simple roots. For the earlier fixed-delay reference calculation, use binary64 round-to-nearest arithmetic, ( B , M ) = ( 16 , 0 ) and hence C = 32 , ε abs = ε rel = 10 − 14 , and an iteration limit of 200 loop visits. Begin with bisection and use the fixed-delay version defined in Section 2. Check the returned point against x p ∗ using (54), rather than accepting a computed zero as an independent accuracy test. Internal reference calculations in Python 3.12.14 on Linux passed this test for all eight cases. The reference root was evaluated as ( 10 − 3 ) 1 / p with the platform power function; this is a numerical reference comparison, not a rigorous enclosure of the real root. The C# evaluation counts in Section 7.3 are separate executions; they are not inferred from these Python calculations. No cross-method timing advantage is claimed.
Three arithmetic cases make the safeguards directly testable. With a = − Ω / 2 , b = Ω , x = Ω / 4 , ε abs = Ω and ε rel = 1 , the real width is 3 Ω / 2 and the tolerance is 5 Ω / 4 : the width test must fail even though both unscaled computations overflow. With a = b = 2 − 1074 , the safeguarded midpoint must remain equal to that endpoint. Finally, for F ^ ( x ) = 10 − 320 ( x − 1 4 ) 3 at x = 0.26 , a machine zero must not pass external root-location validation at tolerance 10 − 14 . The internal checks reproduced the unguarded defects and passed with the stated safeguards. These checks concern the safeguards of Section 5; the implementation used for the benchmark of Section 7.3 and Section 7.4 omits the overflow-aware width comparison and the projection of a subnormal midpoint.
The remaining small checks use f ( x ) = x − 1 4 with endpoint pairs ( 1 4 , 1 ) and ( 1 , 1 4 ) , which must return the endpoint root; f ( x ) = x on [ − 1 , 1 ] with its midpoint evaluation replaced by NaN, which must report invalid input; and f ( x ) = s ( x 3 − 2 ) on [ 0 , 2 ] for s = 1 and s = 10 120 . In the last pair, the two returned values differed by at most 10 − 13 . These checks passed in the same internal reference calculation.

7.7. Implementation and Supporting Data

The C# implementation is maintained by the second author in the development repository https://github.com/Proektsoft-EOOD/ModAB-Root-Finding (accessed on 6 November 2026); the measured source is supplied in the accompanying Revision 2 bundle. Section 2 and Section 5 specify the method, and Section 7.6 specifies the reported checks. The accompanying source bundle contains the implementation, experiment driver, raw records, and SHA-256 manifest. A public archival identifier should refer to these exact source bytes when the revised package is published.
Reproducing the algorithm and matching a particular sequence of binary64 evaluations are different tasks. For the latter, the supplied snapshot must identify the repository commit, runtime and math-library versions, evaluation order, tolerances, iteration limit, and callback-counting rule. The C# comparison is tied to that source bundle, which contains the validator, and to the experiment driver described below. The reference data, raw and validated outputs, build information and source checksums are retained with those records. They can be supplied without adding implementation files to the compact manuscript project.
The experiments of Section 7.3 and Section 7.4 were produced by a driver that runs a parameterized copy of the revised implementation. For the default parameters it reproduces the returned values and evaluation counts of the implementation in the accompanying source bundle on all cases, and with the fixed-delay parameters those of the 2026 implementation. The driver, the raw per-case records and the exact-arithmetic checks are retained with the reproducibility records and are available from the authors on request and in the accompanying source bundle; they are not needed to compile the manuscript.

8. Discussion

An interval can retain endpoint values of opposite signs without its length tending to zero. The interiority of the interpolation point and positivity of the ordinate correction factors preserve the sign condition, but these properties are not sufficient for convergence of the intervals. Ordinary false position already illustrates this difficulty: one endpoint can remain fixed. The geometric bound during each AB phase, together with the bisection that follows its end, ensures the required contraction.
The switching criterion affects the observed convergence rate, but the global proof does not depend on its particular form. Similarly, the Anderson–Björck multiplier influences local convergence, whereas the global argument requires only its positivity and the separation of the actual values of the function from the modified ordinates.
The estimate (40) gives a conservative bound for the hybrid method. It does not describe its local order of convergence. The controlled C# experiment shows an improvement on the specified finite set of problems and identifies errors in the earlier validation procedure, but it does not establish that one method is faster on all admissible functions. The reduction of 1.5% in function evaluations on the 93 reference-eligible cases relative to [10] is confined to 7 of the 101 cases, and the measured run times are unchanged or slightly lower.
For the adaptive rule, the first two width conditions are satisfied automatically, and at most three consecutive exceptions are then allowed when the residual decreases sufficiently. Lemma 5 therefore gives the same constant C = 32 as for the fixed-delay version. The last AB step of a phase may violate this bound, but it cannot increase the length of the interval and the following bisection halves that length. Accounting for both steps gives the factor 7 in the global estimate. The residual factor 1 / 42 is a dimensionless parameter choice, chosen so that this rate of decrease, sustained over the iteration limit of 200 loop visits, would exhaust the binary64 range. Its optimality has not been proved, and every fixed η ∈ ( 0 , 1 ) gives the same width estimate when B and M are unchanged. On the 100 benchmark functions it gives the same results as 1 / 2 since every exception granted there corresponds to a much larger residual decrease; on the counterexample it grants no exception. Every η between about 1 / 797 and 0.41 gives the same results on all 101 cases.
The two exact examples explain the role of the residual condition and the need to limit its use. In the first, one endpoint converges quadratically while the length of the interval tends to a positive limit, so a condition based only on length can interrupt rapid local convergence. In the second, the residual decreases by a fixed factor at every subsequent AB step, yet the interval again fails to shrink to a point. This function satisfies the stated regularity assumptions and involves no extreme magnitudes. The failure therefore occurs in exact arithmetic and is not caused by rounding. With η = 1 / 2 , the C# implementation without the bound terminates at the iteration limit despite continued residual decrease; with η = 1 / 42 , no exception is granted on this function. A finite M restores the condition needed for convergence of the interval lengths; MaxIterations only bounds the duration of the calculation. With B = 2 , the choice M = 3 is the only bound that retains the existing estimate C = 32 , q = 7 . In Table 8 every M ≥ 2 leaves all 101 results unchanged since no test function requests more than two consecutive exceptions; M = 3 keeps one exception in reserve. Smaller values tighten the worst-case bound but increase the evaluation counts on f64 and f84; larger values weaken the bound without benefit on the benchmark. Other finite values are allowed by the theory, and this benchmark does not establish which is optimal.
The distinction between actual values of the function and modified ordinates also makes the mathematical method independent of a particular implementation. The proof concerns the interpolation points and the successive enclosing intervals; it does not depend on the names of C# fields or the software framework.
The convergence theorem assumes a continuous real-valued function and exact arithmetic. A supplied computer routine may instead evaluate a discontinuous expression, return NaN, overflow, underflow to zero on an interval, or depend on an internal state. The arithmetic safeguards keep the trial points within the numerical interval and reject NaN, but they cannot ensure that a computed sign agrees with the sign of the underlying real function. Infinite function values also fall outside Assumption 1.
Finite precision also limits the possible contraction of the interval. When its endpoints are adjacent representable binary64 numbers, the computed midpoint may coincide with an endpoint. The exact-arithmetic halving identity then no longer describes the computed step. The implementation therefore uses a positive mixed absolute–relative tolerance and an iteration limit. The theorem establishes convergence of the mathematical iteration; the arithmetic safeguards specify the treatment of exceptional values in its implementation.

9. Conclusions

Our corrections to the modified Anderson–Björck method ensure that the AB rescaling changes only the interpolation ordinates, while the stored actual function values remain unchanged. Keeping these quantities separate allows the actual values of the function to determine the enclosing interval and the modified ordinates to determine the next approximation.
Global convergence follows by considering the number of bisection steps. Infinitely many bisections force the interval length to zero. If there are only finitely many, the final AB phase continues indefinitely, and Lemma 5 bounds its interval length by a geometric sequence tending to zero. Counting the steps in completed phases and in a possibly incomplete final phase gives, for C = 32 ,
W n ≤ W 0 2 − ⌊ n / 7 ⌋ .
This estimate, like the convergence theorem, holds for the iteration in exact arithmetic, for a continuous function, and without an iteration limit. It is not a guarantee for floating-point function evaluations: its use as an error bound for computed approximations additionally requires that the computed function values have the correct signs at the bracket endpoints, and that the iteration limit is not reached before the width tolerance.
The residual condition allows interpolation to continue when an endpoint approximation improves rapidly while the interval contracts slowly. The first exact example demonstrates the benefit of this choice. Bounding the number of consecutive exceptions preserves the global estimate for the interval length. The second C 1 example proves that removing this bound can prevent the interval length from tending to zero even when the residual decreases by more than one half at every subsequent AB step. With η = 1 / 2 , restoring the bound of three consecutive exceptions removes the observed iteration-limit failure; with the residual factor 1 / 42 used in the implementation, this example grants no exception, and the bound changes no result on the 101-case benchmark. The cubic bound for the switching expression justifies a separate simplification of its evaluation; it does not replace the condition needed for contraction of the interval.
Finally, the size of an iteration step, the residual, and the error in the root approximation are distinct quantities. A small step may be caused by stagnation, a small residual by scaling, and a computed zero by rounding. A short interval bounds the distance to a zero only if that interval actually contains one. The independent validation procedure checks the approximation against reference roots, while retaining the original function evaluation counts. This distinction is also necessary in comparisons between methods, where an inaccurate result obtained after few evaluations must not be counted as an efficient solution.
The revised implementation uses 1.3% fewer function evaluations across all 101 cases and 1.5% fewer on the 93 reference-eligible cases than the corrected implementation of [10]. Validation outcomes are identical; measured run times are similar or modestly lower in the reported environments.

Limitations

The results of this paper are of three kinds, with different scopes. The convergence theorem and its bounds concern exact arithmetic, and so does their Lean 4 verification. The rounding analysis and its Lean 4 verification concern only the switching arithmetic in binary64, for given function values. The numerical experiments concern one implementation on a benchmark of 101 functions and do not establish a general ranking of methods. None of these results certifies that a computed function value has the correct sign, and therefore none of them guarantees that a floating-point run returns an approximation to a zero of the mathematical function.

Supplementary Materials

The following supporting information can be downloaded at: https://www.mdpi.com/article/10.3390/a19121067/s1, Supplementary Material S1: “Formal verification of the switching criterion” (File Supplementary_S1_Formal_Verification.pdf: rounding map, binary64 correspondence theorem and proofs, C# correspondence and reproducibility records, reference evaluation in exact rational arithmetic).

Author Contributions

Conceptualization, L.T. and N.G.; methodology, L.T. and N.G.; software, N.G. and L.T.; validation, N.G. and L.T.; formal analysis, L.T.; investigation, L.T. and N.G.; writing—original draft preparation, L.T.; writing—review and editing, N.G. and L.T. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

The test functions, parameters, validation criteria and rule-check procedure are specified in the manuscript. The C# implementation is maintained in the second author’s repository at https://github.com/Proektsoft-EOOD/ModAB-Root-Finding accessed on 6 November 2026; the revised implementation used in Section 7 is supplied in the accompanying Revision2 source bundle. The Lean formalization and its audit are supplied as ModAB.Switching.Lean, version 0.5.0 (fixed source revision) (https://github.com/Proektsoft-EOOD/ModAB-Root-Finding/tree/ea64a126c9a06294733086824da95a0eec808051/MDPI-Algorithms-Data-2/ModAB.Switching.Lean, accessed on 6 November 2026). Additional supporting verification records and the corresponding implementation snapshot are available from the authors on reasonable request; they can be provided privately to the editor or reviewers during peer review.

Acknowledgments

The authors thank the contributors to the public implementation and benchmark repository. During the preparation of this manuscript, the authors used ChatGPT/Codex GPT-6.2 (OpenAI) and Claude Opus 5.5 (Anthropic) for the purposes of manuscript editing and language revision, proof checking, Lean formalization, source-code review and edits, and preparation of test scripts, reviewer responses and submission materials. Exact version information for all earlier sessions is not available in the authors’ records. The authors have reviewed and edited the output and take full responsibility for the content of this publication.

Conflicts of Interest

N.G. is affiliated with Proektsoft EOOD, which maintains the software repository discussed in this work. The authors declare no other conflicts of interest.

References

  1. Dowell, M.; Jarratt, P. A modified regula falsi method for computing the root of an equation. BIT Numer. Math. 1971, 11, 168–174. [Google Scholar] [CrossRef] [Scilit]
  2. Dowell, M.; Jarratt, P. The “Pegasus” method for computing the root of an equation. BIT Numer. Math. 1972, 12, 503–508. [Google Scholar] [CrossRef] [Scilit]
  3. Anderson, N.; Björck, Å. A new high order method of regula falsi type for computing a root of an equation. BIT Numer. Math. 1973, 13, 253–264. [Google Scholar] [CrossRef] [Scilit]
  4. King, R.F. An improved Pegasus method for root finding. BIT Numer. Math. 1973, 13, 423–427. [Google Scholar] [CrossRef] [Scilit]
  5. Brent, R.P. An algorithm with guaranteed convergence for finding a zero of a function. Comput. J. 1971, 14, 422–425. [Google Scholar] [CrossRef] [Scilit]
  6. Bus, J.C.P.; Dekker, T.J. Two efficient algorithms with guaranteed convergence for finding a zero of a function. ACM Trans. Math. Softw. 1975, 1, 330–345. [Google Scholar] [CrossRef] [Scilit]
  7. Ridders, C.J.F. A new algorithm for computing a single root of a real continuous function. IEEE Trans. Circuits Syst. 1979, 26, 979–980. [Google Scholar] [CrossRef] [Scilit]
  8. Oliveira, I.F.D.; Takahashi, R.H.C. An enhancement of the bisection method average performance preserving minmax optimality. ACM Trans. Math. Softw. 2021, 47, 5. [Google Scholar] [CrossRef] [Scilit]
  9. Ganchovski, N.; Traykov, A. Modified Anderson–Björck’s method for solving non-linear equations in structural mechanics. IOP Conf. Ser. Mater. Sci. Eng. 2023, 1276, 012010. [Google Scholar] [CrossRef] [Scilit]
  10. Ganchovski, N.; Smith, O.; Rackauckas, C.; Tomov, L.; Traykov, A. Improvements to the modified Anderson–Björck (modAB) root-finding algorithm. Algorithms 2026, 19, 332. [Google Scholar] [CrossRef] [Scilit]
  11. Rockafellar, R.T.; Wets, R.J.-B. Variational Analysis; Springer: Berlin/Heidelberg, Germany, 1998. [Google Scholar] [CrossRef] [Scilit]
  12. Dontchev, A.L.; Rockafellar, R.T. Implicit Functions and Solution Mappings: A View from Variational Analysis, 2nd ed.; Springer: New York, NY, USA, 2014. [Google Scholar] [CrossRef] [Scilit]
  13. Proektsoft EOOD. ModAB-Root-Finding: Simplified SgModAB Implementation Snapshot. Commit 51a6d1b. Available online: https://github.com/Proektsoft-EOOD/ModAB-Root-Finding/tree/51a6d1b421fa6b5422b974b61c88acb3ae1945bb (accessed on 23 September 2026).
  14. Goldberg, D. What every computer scientist should know about floating-point arithmetic. ACM Comput. Surv. 1991, 23, 5–48. [Google Scholar] [CrossRef] [Scilit]
  15. Higham, N.J. Accuracy and Stability of Numerical Algorithms, 2nd ed.; SIAM: Philadelphia, PA, USA, 2002. [Google Scholar] [CrossRef] [Scilit]
  16. IEEE Std 754-2019; IEEE Standard for Floating-Point Arithmetic. IEEE: New York, NY, USA, 2019. [Google Scholar] [CrossRef] [Scilit]
  17. Avigad, J.; de Moura, L.; Kong, S.; Ullrich, S. Theorem Proving in Lean 4. Online Edition, with Contributions from the Lean Community. Available online: https://lean-lang.org/theorem_proving_in_lean4/ (accessed on 5 October 2026).
  18. FloatLib contributors. FloatLib: Verified Floating-Point Arithmetic in Lean. Revision 1e83f09ed8c41a953cf8f93d26c210778177b94a. Fixed Source Revision. 2026. Available online: https://github.com/lean-dojo/FloatLib/tree/1e83f09ed8c41a953cf8f93d26c210778177b94a (accessed on 5 October 2026).
  19. Ganchovski, N. ModAB-Root-Finding: Revised Safeguarded Implementation and Accompanying Lean Formalization.Revision2 Source Bundle, November 2026; Source Checksums Accompany the Bundle. Formalization Reference: ModAB.Switching.Lean, Version 0.5.0 (Fixed Source Revision). Available online: https://github.com/Proektsoft-EOOD/ModAB-Root-Finding/tree/ea64a126c9a06294733086824da95a0eec808051/MDPI-Algorithms-Data-2/ModAB.Switching.Lean (accessed on 6 November 2026).
  20. Ganchovski, N. ModAB-Root-Finding: C# Implementation and Benchmark Definitions. Repository Commit 9111cdcc6912401eb684a7b771df3a469795d5b8, Inspected 20–21 September 2026. Available online: https://github.com/Proektsoft-EOOD/ModAB-Root-Finding/tree/9111cdcc6912401eb684a7b771df3a469795d5b8 (accessed on 21 September 2026).
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Article metric data becomes available approximately 24 hours after publication online.