Skip to content

Commit 18354b0

Browse files
Format .jl files [skip ci] (#440)
Co-authored-by: jverzani <[email protected]>
1 parent a70e206 commit 18354b0

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

src/Bracketing/alefeld_potra_shi.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ function init_options(
9696
Roots.FExactOptions(δₐ, δᵣ, maxiters, strict)
9797
end
9898

99-
10099
# fn calls w/in calculateΔ
101100
# 1 is default, but this should be adjusted for different methods
102101
fncalls_per_step(::AbstractAlefeldPotraShi) = 1

src/Bracketing/itp.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ function init_options(
7272
state::AbstractUnivariateZeroState{T,S};
7373
kwargs...,
7474
) where {T,S}
75-
7675
d = kwargs
7776
defs = default_tolerances(M, T, S)
7877
δₐ = get(d, :xatol, get(d, :xabstol, defs[1]))
@@ -85,7 +84,6 @@ function init_options(
8584
return UnivariateZeroOptions(δₐ, δᵣ, ϵₐ, ϵᵣ, maxiters, strict)
8685
end
8786

88-
8987
function update_state(M::ITP, F, o::ITPState{T,S,R}, options, l=NullTracks()) where {T,S,R}
9088
a, b = o.xn0, o.xn1
9189
fa, fb = o.fxn0, o.fxn1

src/convergence.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ function init_options(M, T=Float64, S=Float64; kwargs...)
4949
maxiters = get(d, :maxiters, get(d, :maxevals, get(d, :maxsteps, defs[5])))
5050
strict = get(d, :strict, defs[6])
5151

52-
iszero(δₐ) && iszero(δᵣ) && iszero(ϵₐ) && iszero(ϵᵣ) && return ExactOptions(maxiters, strict)
52+
iszero(δₐ) &&
53+
iszero(δᵣ) &&
54+
iszero(ϵₐ) &&
55+
iszero(ϵᵣ) &&
56+
return ExactOptions(maxiters, strict)
5357
iszero(δₐ) && iszero(δᵣ) && return XExactOptions(ϵₐ, ϵᵣ, maxiters, strict)
5458
iszero(ϵₐ) && iszero(ϵᵣ) && return FExactOptions(δₐ, δᵣ, maxiters, strict)
5559

@@ -61,7 +65,6 @@ function init_options(
6165
state::AbstractUnivariateZeroState{T,S};
6266
kwargs...,
6367
) where {T,S}
64-
6568
d = kwargs
6669
defs = default_tolerances(M, T, S)
6770
δₐ = get(d, :xatol, get(d, :xabstol, defs[1]))
@@ -74,7 +77,6 @@ function init_options(
7477
return UnivariateZeroOptions(δₐ, δᵣ, ϵₐ, ϵᵣ, maxiters, strict)
7578
end
7679

77-
7880
## --------------------------------------------------
7981

8082
"""

test/test_composable.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ using ForwardDiff
2424
@testset "find zero(s) with Unitful" begin
2525
s = u"s"
2626
m = u"m"
27-
g = (9 + 8//10) * m / s^2
27+
g = (9 + 8 // 10) * m / s^2
2828
v0 = 10m / s
2929
y0 = 16m
3030
y(t) = -g * t^2 + v0 * t + y0
@@ -47,7 +47,7 @@ using ForwardDiff
4747
xzs1 = find_zeros(x -> cos(x / 1u"m"), -1.6u"m", 2u"m")
4848
@test length(xzs1) == 2 && maximum(xzs1) 1.5707963267948966 * u"m"
4949

50-
FX = ZeroProblem(y, (0f0s, 2f0s))
50+
FX = ZeroProblem(y, (0.0f0s, 2.0f0s))
5151
prob = Roots.init(FX, Roots.AlefeldPotraShi())
5252
@test Roots.is_small_Δx(prob.M, prob.state, prob.options) isa Bool # does not throw
5353
end

0 commit comments

Comments
 (0)