How many iterations must I do for getting n signs after floating point in calculating square root by Newton's method

Lacey Rojas 2022-08-14 Answered
How many iterations must I do for getting n signs after floating point in calculating square root by Newton's method?
You can still ask an expert for help

Expert Community at Your Service

  • Live experts 24/7
  • Questions are typically answered in as fast as 30 minutes
  • Personalized clear answers
Learn more

Solve your problem for the price of one coffee

  • Available 24/7
  • Math expert for every subject
  • Pay only if we can solve it
Ask Question

Answers (1)

Melany Flynn
Answered 2022-08-15 Author has 12 answers
Wanting to decide on a particular number of iterations before you even start iterating is in general counterproductive.
Instead, simply start iterating, and stop when the difference between two successive approximations is small relative to the precision you need. Since Newton's method converges quadratically, the error in your current approximation will generally be less than the difference between the current and the previous approximation.
(This assumes you know you're somewhere near a root already. Otherwise you may wish, as a sanity check, to require that the successive differences have indeed been decreasing for the last handful of rounds).
Beware, though, that if your initial guess is off in a sufficiently unlucky way, the iteration may not converge at all, so for most practical applications you'll still need some absolute upper bound on the number of iterations, you're willing to do. But there's no need to try to make that upper bound precise.
Not exactly what you’re looking for?
Ask My Question

Expert Community at Your Service

  • Live experts 24/7
  • Questions are typically answered in as fast as 30 minutes
  • Personalized clear answers
Learn more

New questions