



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




When I was at school, my mathematics teacher showed me the follow- ing very strange method to work out square roots, using only subtraction, which is apparently an old Japanese method. I’ll start by writing down the algorithm in a fairly formal way, which may, for example, make it easier to implement on a computer. Although this method converges much more slowly than Newton’s method for finding square roots, for example, this method also has its advantages. Perhaps the main advantage from the computational point of view is that, when finding square roots of integers, no infinite decimals are involved at any step, which can cause loss of precision due to rounding errors.
Initial step
Let a = 5n (this multiplication by 5 is the only time when an operation other than addition and subtraction is involved!), and put b = 5.
Repeated steps
(R1) If a ≥ b, replace a with a − b, and add 10 to b.
(R2) If a < b, add two zeroes to the end of a, and add a zero to b just before the final digit (which will always be ‘5’).
Conclusion
Then the digits of b approach more and more closely the digits of the square root of n.
To illustrate the method, let’s begin to work out the value of the square root of 2. The initial step sets a = 5 × 2 = 10 and b = 5. So we start with the pair (a, b) = (10, 5). Now we perform the repeated steps. As 10 > 5, we must apply R1. We therefore replace a with a − b, so that now a = 10 − 5 = 5, and add 10 to b, so that b becomes 15. The new pair is therefore (5, 15). We apply the rule again. This time, however, a = 5 < 15 = b, and so we use R2. This rule says: Add two zeroes to the end of a, to make a = 500, and put a zero before the final digit of b, so that now b = 105. The pair becomes (500, 105). Now 500 > 105, so we apply R1, and we replace a by a − b = 500 − 105 = 395, and add 10 to b, so that b becomes 115. Our pair is then (395, 115). Repeatedly applying the rules in turn gives:
(10, 5) R −→ (5, 15) R −→ (500, 105) R −→ (395, 115) R −→ (280, 125) R −→ (155, 135) R −→ (20, 145) R −→ (2000, 1405) R −→ (595, 1415) R −→ (59500, 14105) R −→ (45395, 14115) R −→ (31280, 14125) R −→ (17155, 14135) R −→ (3020, 14145) R −→ (302000, 141405) −→^ R1 (160595, 141415) −→R1 (19180, 141425) −→R2 (1918000, 1414205) −→ · · ·
and you can see that the digits of b are settling down to start with 14142.. .. Moreover, (^) √ 2 = 1. 41421356.... In fact, the method does not only work for positive integers. The method works for all positive numbers, even decimals such as 2.71, and even π. In these cases, rather than add two zeroes at the end, we have to multiply by 100 (which comes to the same thing for integers), i.e., to shift the decimal point two places to the right. Here’s another example, where we work out the square root of 2.345. Initially, a = 5 × 2 .345 = 11.725, and b = 5. Now apply the steps as before to get:
(11. 725 , 5) R −→ (6. 725 , 15) R −→ (672. 5 , 105) R −→ (567. 5 , 115) R −→ (452. 5 , 125) R −→ (327. 5 , 135) R −→ (192. 5 , 145) R −→ (47. 5 , 155) R −→ (4750, 1505) R −→ (3245, 1515) R −→ (1730, 1525) R −→ (205, 1535) R −→ (20500, 15305) R −→ (5195, 15315) R −→ (519500, 153105) −→ · · ·
and the correct value for
2 .345 is 1. 53133928.. ..
As remarked above, we’ll assume that our initial number lies between 1 and 100, so that its square root lies between 1 and 10. Thus we suppose that b is equal to b 0 .b 1 b 2 b 3... , where all of the bi lie between 0 and 9. Let’s show that n = b^2. We shall consider a modified version of the algorithm which incorporates the decimal point: Let a = n/2, and put b = 0.5.
Repeated steps
(R1′) If a ≥ b, replace a with a − b, and increase the next-to-last decimal digit of b by 1;
(R2′) If a < b, add two zeroes to the end of a, divide b by 10, and add a zero to b just before the final decimal digit (which will always be ‘5’).
Let’s see how this works in the example before, where n = 2. We begin by setting a = n/2 = 1, and b = 0.5. Next, we run through the steps:
(1, 0 .5) R1′ −→ (0. 5 , 1 .5) R2′ −→ (0. 5 , 0 .105) R1′ −→ (0. 395 , 0 .115) R1′ −→ (0. 280 , 0 .125) −→^ R1′ (0. 155 , 0 .135) −→R1′ (0. 020 , 0 .145) −→R2′ (0. 02000 , 0 .01405) R1′ −→ (0. 00595 , 0 .01415) R2′ −→ (0. 0059500 , 0 .0014105) −→^ R1′ (0. 0045395 , 0 .0014115) −→R1′ (0. 0031280 , 0 .0014125) R1′ −→ (0. 0017155 , 0 .0014135) R1′ −→ (0. 0003020 , 0 .0014145) R2′ −→ (0. 000302000 , 0 .000141405) R1′ −→ (0. 000160595 , 0 .000141415) R1′ −→ (0. 000019180 , 0 .000141425) R2′ −→ (0. 00001918000 , 0 .00001414205) −→ · · ·
(Note that the numbers which appear are exactly the same as in the earlier example; we have merely multiplied all of them by a power of 10.) We begin with a = n/2, and, using rule R1′, we have to subtract various numbers (which we occasionally make smaller with rule R2′), we eventually get that the first number in the pair approaches 0. It follows that a is the sum of all the numbers which we take away from it, to get 0. Before the first application of R2′, we make b 0 applications of rule R1′, subtracting b 0 /2 on average each time. The total amount subtracted in these steps is therefore b^20 /2. Between the first and second applications of R2′, we make b 1 applications of rule R1′, subtracting b 0 /10 + b 1 /200 on average each time. The total amount subtracted in these steps is therefore b 0 b 1. 10 −^1 + b^21. 10 −^2 /2. Between the second and third applications of R2′, we make b 2 applications of rule R1′, subtracting b 0 /100 + b 1 /1000 + b 2 /20000 on average each time.
The total amount subtracted in these steps is therefore b 0 b 2. 10 −^2 +b 1 b 2. 10 −^3 + b^22. 10 −^4 /2. In general, between the kth and k + 1st applications of R2′, we make bk applications of rule R1′, subtracting b 0. 10 −k^ + b 1. 10 −k−^1 + · · · + bk− 1. 101 −^2 k^ + bk. 10 −^2 k/2 on average each time. The total amount subtracted in these steps is therefore b 0 bk. 10 −k^ + b 1 bk. 10 −k−^1 + · · · + bk− 1 bk. 101 −^2 k^ + b^2 k. 10 −^2 k/ 2 But remember that n/2 must be the sum of all the terms we are sub- tracting. Thus
n/ 2 = b^20 / 2
the total subtracted before the first R2′, between the first and second, be- tween the second and third, and so on. Note that the coefficient of bibj is 10 −i−j^ if i and j are different, and is 10−i−j/2 if i = j. However, if we expand
(b 0 + b 1. 10 −^1 + b 2. 10 −^2 + b 3. 10 −^3 + · · · )^2 ,
then the coefficient of bibj is 2. 10 −i−j^ if i and j are different, and is 10−i−j^ if i = j. It follows that the sum making n/2 above is exactly
(b 0 + b 1. 10 −^1 + b 2. 10 −^2 + b 3. 10 −^3 + · · · )^2 / 2 ,
and so n = (b 0 + b 1. 10 −^1 + b 2. 10 −^2 + b 3. 10 −^3 + · · · )^2 ,
so that (^) √ n = b 0 + b 1. 10 −^1 + b 2. 10 −^2 + b 3. 10 −^3 + · · · ,
and the digits bi coming out of the algorithm are therefore exactly the digits in the decimal expansion of
n, as required.
Frazer Jarvis is a member of the Department of Pure Mathe- matics at the University of Sheffield, and his research interests are centred on algebraic number theory. Outside mathematics, he is a keen pianist and sings with the Sheffield Philharmonic Chorus.