You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although the IntervalNonlinearProblemdocs say keyword arguments are passed to the solver, I do not find the solution to depend on the abstol passed to the problem (abstol does have an effect when passed to the solve). I only tested ITP.
Expected behavior
I would like to see that the abstol passed to the problem overrides the default abstol, but is of lower precedence than tolerances passed into solve.
Minimal Reproducible Example 👇
using SimpleNonlinearSolve
const counter =Ref(0)
prob =IntervalNonlinearProblem((x, counter) -> (counter[] +=1; exp(-x)-x), (0.0, 1.0), counter; abstol=1e-3)
solve(prob, ITP())
counter[] # 37
counter[] =0solve(prob, ITP(); abstol=1e-3)
counter[] # 9, fewer function evaluations than first, meaning the problem tolerance was not used
I was using SimpleNonlinearSolve.jl v2.1.0.
The text was updated successfully, but these errors were encountered:
Absolute tolerance needs to be specified in solve, in your first solve(prob, ITP()), ITP utilized the default abstol as real(oneunit(T)) * (eps(real(one(T))))^(4 // 5) which is approximately 3e-13. Then in your second solve(prob, ITP(); abstol=1e-3), the absolute tolerance is specified as 1e-3, hence fewer function evaluations.
Absolute tolerance needs to be specified in solve, in your first solve(prob, ITP()), ITP utilized the default abstol as real(oneunit(T)) * (eps(real(one(T))))^(4 // 5) which is approximately 3e-13. Then in your second solve(prob, ITP(); abstol=1e-3), the absolute tolerance is specified as 1e-3, hence fewer function evaluations.
The issue here is if we specify kwargs in IntervalNonlinearProblem, those should be forwarded to solve automatically.
Describe the bug 🐞
Although the
IntervalNonlinearProblem
docs say keyword arguments are passed to the solver, I do not find the solution to depend on theabstol
passed to the problem (abstol
does have an effect when passed to thesolve
). I only testedITP
.Expected behavior
I would like to see that the
abstol
passed to the problem overrides the defaultabstol
, but is of lower precedence than tolerances passed intosolve
.Minimal Reproducible Example 👇
I was using SimpleNonlinearSolve.jl v2.1.0.
The text was updated successfully, but these errors were encountered: