Let's now illustrate the method with a = 163. To initialize the computation, we can start with a, or, since 163 lies between 144 = 122 and 169 = 132, with 12.
After just three iterations of the algorithm, the result is remarkable, since 163=12,7671453348037…
In fact, the number of correct decimal places doubles (at least) with each loop—a phenomenon known as quadratic convergence.
Each iteration requires one addition and one division, together with a division by 2, which is easy to program in binary: just three operations in all.
Schönhage's trick
---------------------
The main drawback of Heron's sequence (see above) is that it involves a division: division is a "troublesome" and "slow" operation, even for an electronic circuit. But the division "a / *un" can be replaced by an iteration: once again, we use Newton's method to compute the reciprocal 1/b of a real number b > 0. This time we use the function g defined by g(x)=x1−b, which gives the sequence v defined by vn*+1 = *vn(2 ‒ bvn*).
Indeed:
g(x)=x1−b, and g′(x)=x2−1,
hence
g′(x)g(x)=x2−1x1−b=−x2(x1−b)=−x+bx2,
that is,
vn+1=vn−g′(un)g(un)=vn+vn−bvn2=vn(2−bvn).
We can do even better! The German mathematician Arnold Schönhage (born in 1934) had the idea of coupling the two Newton iterations, a combination that proved more efficient than using the two methods separately. To find an approximation to the square root of a > 0, we start with the sequence u, defined by
un+1=21(un+una)=un+2una−un2.
To compute 2un1, we use Newton's method to compute reciprocals.
In this setting, we use two sequences, u and v:
{un+1=un+(a−un2)vn,\[0,7mm]vn+1=vn(2−2unvn)=vn+(1−2unvn)vn, with v0=2u01.