Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.
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
8 changes: 4 additions & 4 deletions src/itp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function SciMLBase.solve(prob::IntervalNonlinearProblem, alg::ITP,
n0 = alg.n0
n_h = ceil(log2(abs(right - left) / (2 * ϵ)))
mid = (left + right) / 2
x_f = left + (right - left) * (fl/(fl - fr))
x_f = left + (right - left) * (fl / (fl - fr))
xt = left
xp = left
r = zero(left) #minmax radius
Expand All @@ -94,7 +94,7 @@ function SciMLBase.solve(prob::IntervalNonlinearProblem, alg::ITP,
δ = k1 * (span^k2)

## Interpolation step ##
x_f = left + (right - left) * (fl/(fl - fr))
x_f = left + (right - left) * (fl / (fl - fr))

## Truncation step ##
σ = sign(mid - x_f)
Expand Down Expand Up @@ -125,8 +125,8 @@ function SciMLBase.solve(prob::IntervalNonlinearProblem, alg::ITP,
fl = yp
else
return SciMLBase.build_solution(prob, alg, xp, yps;
retcode = ReturnCode.Success, left = xp,
right = xp)
retcode = ReturnCode.Success, left = xp,
right = xp)
end
i += 1
mid = (left + right) / 2
Expand Down