@@ -20,12 +20,12 @@ function Bisection(; exact_left = false, exact_right = false)
2020end
2121
2222function SciMLBase. solve (prob:: IntervalNonlinearProblem , alg:: Bisection , args... ;
23- maxiters = 1000 , abstol = nothing ,
23+ maxiters = 1000 , abstol = min ( eps (prob . tspan[ 1 ]), eps (prob . tspan[ 2 ])) ,
2424 kwargs... )
2525 f = Base. Fix2 (prob. f, prob. p)
2626 left, right = prob. tspan
2727 fl, fr = f (left), f (right)
28- atol = abstol != = nothing ? abstol : min ( eps (left), eps (right))
28+ # atol = abstol
2929 if iszero (fl)
3030 return SciMLBase. build_solution (prob, alg, left, fl;
3131 retcode = ReturnCode. ExactSolutionLeft, left = left,
@@ -46,7 +46,7 @@ function SciMLBase.solve(prob::IntervalNonlinearProblem, alg::Bisection, args...
4646 retcode = ReturnCode. FloatingPointLimit,
4747 left = left, right = right)
4848 fm = f (mid)
49- if abs ((right - left) / 2 ) < atol
49+ if abs ((right - left) / 2 ) < abstol
5050 return SciMLBase. build_solution (prob, alg, mid, fm;
5151 retcode = ReturnCode. Success,
5252 left = left, right = right)
@@ -73,7 +73,7 @@ function SciMLBase.solve(prob::IntervalNonlinearProblem, alg::Bisection, args...
7373 retcode = ReturnCode. FloatingPointLimit,
7474 left = left, right = right)
7575 fm = f (mid)
76- if abs ((right - left) / 2 ) < atol
76+ if abs ((right - left) / 2 ) < abstol
7777 return SciMLBase. build_solution (prob, alg, mid, fm;
7878 retcode = ReturnCode. Success,
7979 left = left, right = right)
0 commit comments