nth root algorithm

This online calculator implements nth root algorithm to find the principal nth root of a positive real number.

Creative Commons Attribution/Share-Alike License 3.0 (Unported)

This content is licensed under Creative Commons Attribution/Share-Alike License 3.0 (Unported). That means you may freely redistribute or modify this content under the same license conditions and must attribute the original author by placing a hyperlink from your site to this work https://planetcalc.com/8311/. Also, please do not modify any references to the original work (if any) contained in this content.

Out of curiosity, this calculator implements nth root algorithm. This is iterative algorithm which is said to be very fast-converging, so the calculator lists the results of each iteration: current computed root value and current delta from previously computed root value. Calculator stops the iterations when desired precision is obtained, in other words, when the delta between previous and current computed roots is less than a precision. The description of the algorithm can be found below the calculator.

PLANETCALC, nth root algorithm

nth root algorithm

Digits after the decimal point: 4
nth root

nth root algorithm

The algorithm is quite simple.

Step 1. Make an initial guess


In this calculator to get initial guess I simply divide number by root's degree if number is more than 1, and multiply by root's degree otherwise.

Step 2. Set

x_{k+1}={\frac {1}{n}}\left[{(n-1)x_{k}+{\frac {A}{x_{k}^{n-1}}}}\right].

For precision check, it is more practical to compute delta separately

\Delta x_{k}={\frac {1}{n}}\left[{\frac {A}{x_{k}^{n-1}}}-x_{k}\right];\\ \\x_{k+1}=x_{k}+\Delta x_{k}.

Step 3. Repeat step 2 until the desired precision is reached:

|\Delta x_{k}|<\epsilon.

The algorithm can be derived from Newton's method for


where x is the root, and A is positive real number.

URL copied to clipboard
Creative Commons Attribution/Share-Alike License 3.0 (Unported) PLANETCALC, nth root algorithm