Skip to content

Commit f71d588

Browse files
Format .jl files [skip ci] (#461)
Co-authored-by: jverzani <[email protected]>
1 parent 1a72f34 commit f71d588

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/convergence.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,11 @@ function assess_convergence(M::Any, state::AbstractUnivariateZeroState, options)
287287
return (:not_converged, false)
288288
end
289289

290-
function assess_convergence(M::AbstractBisection, state::AbstractUnivariateZeroState, options::O) where {O <: Union{ExactOptions, XExactOptions}}
290+
function assess_convergence(
291+
M::AbstractBisection,
292+
state::AbstractUnivariateZeroState,
293+
options::O,
294+
) where {O<:Union{ExactOptions,XExactOptions}}
291295
# return convergence_flag, boolean
292296
# no check if f == ∞
293297
is_exact_zero_f(M, state, options) && return (:exact_zero, true)
@@ -297,7 +301,6 @@ function assess_convergence(M::AbstractBisection, state::AbstractUnivariateZeroS
297301
return (:not_converged, false)
298302
end
299303

300-
301304
# speeds up exact f values by just a bit (2% or so) over the above, so guess this is worth it.
302305
function assess_convergence(
303306
M::AbstractBracketingMethod,

test/test_find_zero.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -589,9 +589,9 @@ end
589589
@testset "bracketing_atol" begin
590590
## issue $457
591591
f(x) = x^2 - 4
592-
@test find_zero(f, (0,Inf)) 2 # 2.0 correct
593-
@test find_zero(f, (0,Inf), atol=1) 1.9997558593749998
594-
@test find_zero(f, (0,Inf),atol=1e-5) 1.9999998807907102
595-
@test find_zero(f, (0,8), atol=1) 1.99609375
596-
@test find_zero(f, (0,8), atol=1e-3) 2.0000152587890625
592+
@test find_zero(f, (0, Inf)) 2 # 2.0 correct
593+
@test find_zero(f, (0, Inf), atol=1) 1.9997558593749998
594+
@test find_zero(f, (0, Inf), atol=1e-5) 1.9999998807907102
595+
@test find_zero(f, (0, 8), atol=1) 1.99609375
596+
@test find_zero(f, (0, 8), atol=1e-3) 2.0000152587890625
597597
end

0 commit comments

Comments
 (0)