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.
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.
Hi CB,
Bacially,the algorithm is some thing likes below,
http://en.wikipedia.org/wiki/Shiftin...root_algorithm
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).