Skip to content

Commit 2f9f17a

Browse files
Merge pull request #2499 from SciML/pifloat
Improve float conversions in PI controllers
2 parents f82f6d8 + c755f9d commit 2f9f17a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/OrdinaryDiffEqCore/src/integrators/controllers.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ end
141141
if iszero(EEst)
142142
q = inv(qmax)
143143
else
144-
q11 = FastPower.fastpower(EEst, float(beta1))
145-
q = q11 / FastPower.fastpower(qold, float(beta2))
144+
q11 = FastPower.fastpower(EEst, convert(typeof(EEst),beta1))
145+
q = q11 / FastPower.fastpower(qold, convert(typeof(EEst),beta2))
146146
integrator.q11 = q11
147147
@fastmath q = max(inv(qmax), min(inv(qmin), q / gamma))
148148
end

lib/OrdinaryDiffEqFIRK/test/ode_firk_tests.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using OrdinaryDiffEqFIRK, DiffEqDevTools, Test, LinearAlgebra
22
import ODEProblemLibrary: prob_ode_linear, prob_ode_2Dlinear, van
33

4-
testTol = 0.3
4+
testTol = 0.35
55

66
for prob in [prob_ode_linear, prob_ode_2Dlinear]
77
sim21 = test_convergence(1 .// 2 .^ (6:-1:3), prob, RadauIIA5())

0 commit comments

Comments
 (0)