Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions src/internal_itp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function SciMLBase.solve(prob::IntervalNonlinearProblem{IP, Tuple{T, T}}, alg::I
retcode = ReturnCode.ExactSolutionRight, left, right)
end
span = abs(right - left)
k1 = T(alg.scaled_k1)/span
k1 = T(alg.scaled_k1) / span
n0 = T(alg.n0)
n_h = exponent(span / (2 * ϵ))
ϵ_s = ϵ * exp2(n_h + n0)
Expand All @@ -61,11 +61,6 @@ function SciMLBase.solve(prob::IntervalNonlinearProblem{IP, Tuple{T, T}}, alg::I
xt = ifelse(δ ≤ abs(diff), x_f + copysign(δ, diff), mid) # Truncation Step

xp = ifelse(abs(xt - mid) ≤ r, xt, mid - copysign(r, diff)) # Projection Step
if span < 2ϵ
return SciMLBase.build_solution(
prob, alg, xt, f(xt); retcode = ReturnCode.Success, left, right
)
end
yp = f(xp)
yps = yp * sign(fr)
if yps > T0
Expand All @@ -74,7 +69,7 @@ function SciMLBase.solve(prob::IntervalNonlinearProblem{IP, Tuple{T, T}}, alg::I
left, fl = xp, yp
else
return SciMLBase.build_solution(
prob, alg, xp, yps; retcode = ReturnCode.Success, left, right
prob, alg, xp, yps; retcode = ReturnCode.Success, left = xp, right = xp
)
end

Expand Down
Loading