We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e83e35 commit aa3eaa6Copy full SHA for aa3eaa6
lib/BracketingNonlinearSolve/src/itp.jl
@@ -95,15 +95,15 @@ function CommonSolve.solve(
95
k2 = alg.k2
96
k1 = alg.scaled_k1 * abs(right - left)^(1 - k2)
97
n0 = alg.n0
98
- n_h = ceil(log2(abs(right - left) / (2 * ϵ)))
99
mid = (left + right) / 2
100
x_f = left + (right - left) * (fl / (fl - fr))
101
xt = left
102
xp = left
103
r = zero(left) # minmax radius
104
δ = zero(left) # truncation error
105
- σ = 1.0
106
- ϵ_s = ϵ * 2^(n_h + n0)
+ σ = one(mid)
+ n_h = exponent(abs(right - left) / (2 * ϵ))
+ ϵ_s = ϵ * exp2(n_h + n0)
107
108
i = 1
109
while i ≤ maxiters
0 commit comments