Introduction - If you have any usage issues, please Google them yourself
Square convergence of the algorithm is (each iteration doubles the effective number of bits),
Such a request to the Q digits to at least log2Q 1 iterations
Obviously, this calculation is expressed to high accuracy,
The algorithm I used is the ordinary high-precision addition, subtraction
Addition and subtraction is O (n), the time spent very little.
Multiplication and division is O (n2), mainly time spent in this way.
By this algorithm can be seen, bn square root calculation needs.
There are two ways to open root:
① The middle school to teach our method, each time to open the two radicals, with the division to lose,
This time is n2 · n/2 = O (n3), can not stand it!
② The Newton iteration.
That
x0 = any positive number,
xn 1 = (xn a/xn)/2
Similarly, the square is also the convergence of the algorithm.
One division is O (n2) of the
It still needs O (n2log2n) time