Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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

P.S Sorry for my bad English. Please mention to me where I've done mistakes. Thanks.

share|improve this question
    
See this question: math.stackexchange.com/q/247567/31475 –  Arkamis Nov 30 '12 at 20:45
    
Also, we can not mention where you've made any mistakes, because you haven't shown any work! –  Arkamis Nov 30 '12 at 20:46
    
But I want said that you correct my mistakes in my Using English –  skeeph Nov 30 '12 at 20:48
    
Oh, that's quite different! :D –  Arkamis Nov 30 '12 at 20:50
    
From post, given by you, I don't understand answer to my question/ –  skeeph Nov 30 '12 at 20:57
show 3 more comments

1 Answer

up vote 3 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.