Skip to content

Commit

Permalink
Fix ITP for generic output numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniGlez committed Aug 9, 2024
1 parent ec1e309 commit 145d5f2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/SimpleNonlinearSolve/src/bracketing/itp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,11 @@ function SciMLBase.solve(prob::IntervalNonlinearProblem, alg::ITP, args...;
xp <= tmin && (xp = nextfloat(tmin))
yp = f(xp)
yps = yp * sign(fr)
if yps > 0
T0 = zero(yps)
if yps > T0
right = xp
fr = yp
elseif yps < 0
elseif yps < T0
left = xp
fl = yp
else
Expand Down

0 comments on commit 145d5f2

Please sign in to comment.