# Number of needed iterations in finding p'th root of a number with newton method

I need to write a parallel code for finding p'th root of n with newton method. I know how the serial code must be. The only method I found to get rid of the do-while loop in the code is finding a formula to calculate the number of iterations, so that I can use a for loop with predetermined number of iterations.

So, I am looking for a formula to find the number of iterations in newton method to find the root of a number. Is there any way to do so?

Thanks a lot.

• How small does the error have to be? You will not get the exact result with a numerical method. – naslundx Feb 28 '14 at 10:10
• Where do you start for solving $x^p=n$ ? – Claude Leibovici Feb 28 '14 at 10:15
• Do you need multi-precision or integer root? Otherwise you have $\exp(\ln(x)/p)$ and maybe one Newton step. And for complex roots there are some fractal subleties for the convergence regions. – gammatester Feb 28 '14 at 10:21
• @user132112 How will the for loop do anything to parallelize your code? You'd still have each loop result depending serially on the previous one. – Erick Wong Mar 1 '14 at 16:47
• @ErickWong Well, is there any way at all to parallelize such a code? – far Mar 2 '14 at 17:55