Skip to content

Commit

Permalink
Merge pull request #2499 from SciML/pifloat
Browse files Browse the repository at this point in the history
Improve float conversions in PI controllers
  • Loading branch information
ChrisRackauckas authored Oct 21, 2024
2 parents f82f6d8 + c755f9d commit 2f9f17a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/OrdinaryDiffEqCore/src/integrators/controllers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ end
if iszero(EEst)
q = inv(qmax)
else
q11 = FastPower.fastpower(EEst, float(beta1))
q = q11 / FastPower.fastpower(qold, float(beta2))
q11 = FastPower.fastpower(EEst, convert(typeof(EEst),beta1))
q = q11 / FastPower.fastpower(qold, convert(typeof(EEst),beta2))
integrator.q11 = q11
@fastmath q = max(inv(qmax), min(inv(qmin), q / gamma))
end
Expand Down
2 changes: 1 addition & 1 deletion lib/OrdinaryDiffEqFIRK/test/ode_firk_tests.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using OrdinaryDiffEqFIRK, DiffEqDevTools, Test, LinearAlgebra
import ODEProblemLibrary: prob_ode_linear, prob_ode_2Dlinear, van

testTol = 0.3
testTol = 0.35

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

0 comments on commit 2f9f17a

Please sign in to comment.