1. Use Newton's method & shifting nth root algorithm to compute nth root
I don't know how to apply Newton's method & shifting nth root algorithm in matlab code.
Bacially,the algorithm is some thing likes below,
The final algorithm is:
- Initialize r and y to 0
- Repeat until desired precision is obtained:
- Let α be the next aligned block of digits from the radicand
- Let β be the largest β such that
- Let y' = By + β
- Let r' = Bnr + α − ((By + β)n − Bnyn)
- Assign and
- y is the largest integer such that yn < xBk, and yn + r = xBk, where k is the number of digits of the radicand after the decimal point that have been consumed (a negative number if the algorithm hasn't reached the decimal point yet).