0
$\begingroup$

I'm currently doing some practice problems on root-finding and am writing up some notes / comments on my code. In my solver code, if my function value is below the tolerance that I've set, should I write,

"the function converged to a root, since the function evaluation is below the function tolerance"

or

"the function converged to a root, since the function tolerance is achieved"?

Is there a better way to word it?

$\endgroup$
5
  • $\begingroup$ What is your stopping criterion? @user37069 $\endgroup$ – Vefhug Sep 21 '20 at 20:37
  • $\begingroup$ You could say the first option, which is what you did. $\endgroup$ – Vefhug Sep 21 '20 at 20:58
  • $\begingroup$ @Vefhug Ok, will do -- thanks so much! $\endgroup$ – user37069 Sep 21 '20 at 21:00
  • 1
    $\begingroup$ You're welcome. Maybe you could consider more precise stopping criteria. Indeed, it can happen that the residual is "large", but you're close to $0$ (when the derivative is high near the root). But also the converse can happen, for instance when the derivative is close to $0$ at the root you may find a small residual, but you're actually far from the solution. @user37096 $\endgroup$ – Vefhug Sep 21 '20 at 21:07
  • 1
    $\begingroup$ The residual should decrease in a certain way with the iteration number, and monitoring this should tell more about the convergence than the residual size alone $\endgroup$ – Maxim Umansky Sep 22 '20 at 8:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.