Skip to content

Commit

Permalink
Avoid type promotions due to hard-coded tolerances
Browse files Browse the repository at this point in the history
...in the `AlefieldPotraShi` solver.
  • Loading branch information
jmert authored Aug 25, 2024
1 parent 5794200 commit d5432d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Bracketing/alefeld_potra_shi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function update_state(
options,
l=NullTracks(),
) where {T,S}
μ, λ = 0.5, 0.7
μ, λ = T(0.5), T(0.7)
atol, rtol = options.xabstol, options.xreltol
tols = (; λ=λ, atol=atol, rtol=rtol)

Expand Down Expand Up @@ -187,7 +187,7 @@ struct A2425{K} <: AbstractAlefeldPotraShi end
function calculateΔ(::A2425{K}, F::Callable_Function, c₀::T, ps) where {K,T}
a, b, d, ee = ps.a, ps.b, ps.d, ps.ee
fa, fb, fd, fee = ps.fa, ps.fb, ps.fd, ps.fee
tols ==0.7, atol=ps.atol, rtol=ps.rtol)
tols ==T(0.7), atol=ps.atol, rtol=ps.rtol)

c = a
for k in 1:K
Expand Down Expand Up @@ -236,7 +236,7 @@ fncalls_per_step(::A57{K}) where {K} = K - 1
function calculateΔ(::A57{K}, F::Callable_Function, c₀::T, ps) where {K,T}
a, b, d, ee = ps.a, ps.b, ps.d, ps.ee
fa, fb, fd, fee = ps.fa, ps.fb, ps.fd, ps.fee
tols ==0.7, atol=ps.atol, rtol=ps.rtol)
tols ==T(0.7), atol=ps.atol, rtol=ps.rtol)
c, fc = a, fa

for k in 1:K
Expand Down

0 comments on commit d5432d1

Please sign in to comment.