Square Roots by Hand Instructions: Example: 1 Count the number of digits your number has that are on the left 28.6, breaks up into side of the decimal point. If the number of digits is odd, then "28" "60" "00". add a "0" to the front of your number. Obviously that doesn't However, 9.1 breaks change your number's value, but it's important because now you up as "09" "10" need to break the number into groups of two digits, and it's "00". important that you break your number up on the proper boundries. 2 The first group is 28, Look at the first group of two digits as its own number. Find the which gives us 5 largest number whose square is equal to or less than that. This is since 52 = 25, which the first digit of the exact square root. is less than 28. 3 Square the first digit of the square root and subtract the result 28 - 25 = 3 from the first group of two digits. 4 Now append the next group of two digits to the result of step 3 "3" + "60" yields to obtain the partial dividend. "360" 5 Now multiply what you have of the square root so far by 2, and 5 x 2 = 10 discard any decimal points. This is the partial divisor. 6 Divide the partial divisor into the partial dividend and take the 360/10 = 36, which first digit of the result. This is the next digit of the square root. yields "3" Since we worked with the first digit after the decimal in our original number (the 6 in 28.6) to figure out the new digit, we put a decimal in front of the new digit. So far, our square root is: 5.3 7 Take the new digit from step 6 and append it to the partial "10" + "3" yields divisor from step five. 103 8 Multiply the result by the new digit. 103 x 3 = 309 9 Subtract that from the old partial dividend. 360 - 309 = 51 10 Append the next group of two digits (00) to the result of step 9 "51" + "00" yields to get a new partial dividend. 5100 At this point the algorithm starts repeating steps: 11 Repeat step 5: Multiply what you have of the square root by 53 x 2 = 106 two and discard decimal points, to get a new partial divisor. 12 Repeat step 6: Divide the partial divisor into the partial divided 5100/106 = 48.11..., and take the first digit of the result. which yields 4 Tack the new digit onto the end of the square root, to get: 5.34 13 For more digits of accuracy, just repeat steps 7 through 10, and then loop back to step 5 as many times as you want. Add more groups of "00" as necessary. As if all that weren't enough, there is one thing to watch out for. In fact, if you tried to follow that set of instructions with some other number than 28.6, you may well have found out what that is: The result of step 9 may be a negative number! "So what?", you may ask. Well, since the results of step 9 are the basis for the next partial dividend, getting a negative number means having a negative partial dividend. And that, when you get to step 12 (or the repeat of step 6), means that the next digit of the square root will be negative! "Goodness!" you exclaim, "what on earth does it mean to have a negative digit in a number?" Fortunately, the answer to that question is "nothing". If you think back to when you were in the first or second grade when your math teacher explained the decimal notation system to you, you'll remember that decimal notation is a (very convenient) shorthand for a sum. For example, 127.6 is 1 in the 100's place, plus 2 in the 10's place, plus 7 in the one's place. Or, 1x100 + 2x10 + 7x1 + 6x.1. The digits are simply shorthand for various products that you add together. So with that in mind, we see that having a negative digit is no big deal (aside from being awkward to write). It just means you have to do a little math in order to come up with a "normal" number that has all positive digits. For example, what if instead of 127.6, the 2 was negative? That would be 1x100 + (-2)x10 + 7x1 + 6x.1, which is 100 - 20 + 7 + .6, or 87.6 So if the result of step 9 is a negative number, don't worry about it. Just proceed as normal. Let's look at an example that has this phenomenon (I'll just show the steps here, I won't repeat the descriptions of them): The square root of 77.15 is: Step: Result: 0 sqrt(77.15) = ?.??? 1 77.15 yields "77" "15" "00" 2 82 = 64, and 64 < 77 8.??? 3 77 - 64 = 13 4 "13" + "15" = "1315" 5 8x2 = 16 6 1315/16 yields 8 8.8?? (= 8 + 8x10-1) 7 "16" + "8" = "168" 8 168x8 = 1344 9 1315 - 1344 = -29 10 "-29" + "00" = "-2900" 11 88x2 = 176 12 -2900/176 yields -1 8.79 (= 8 + 8x10-1 + (-1)x10-2) 13 "176" + "-1" = 1761 The derivation of that 1761 is actually a little tricky. Remember that you have to append the new digit to the partial divisor, then multiply the result by the new digit. Appending a negative digit is a different operation than tacking a new digit on to the end of your result, because now you're really performing the calculation (-(176x10 + 1)), which you then multiply by -1 to get 1761. The minus signs nicely cancel out, which is good. So what you really do is append the absolute value of the new digit to the partial divisor, and make the result the same sign as the new digit. Then multiply by the new digit as normal. You will always get a positive result from this. 14 -2900 - 1761 = -4661 15 "-4661" + "00" = "-466100" 16 879x2 = 1758 17 -466100/1758 yields -2 8.788 (= 8 + 8x10-1 + (-1)x10-2 + (-2)x10-3) And indeed, that's not a bad answer since 8.7882 = 77.228944, which is only off by .078944. Not bad at all, for only three cycles through the algorithm. You may wonder if this business with negative digits ever stops. The answer is no. The reason is because of the nature of the algorithm. This is a successive approximation algorithm, which means that each step gets you a little closer to the correct answer. So if your initial approximation is too small, the algorithm will have to add a small positive amount at each step in order to make progress towards the correct answer. But if the initial approximation is too large, the algorithm has no choice but to take small amounts away from the approximation at each step. Otherwise, the approximation would just get worse. But how does it get like this? Notice that steps 1 through 4, are different, and they're not repeated. They are engineered to always give you a positive first digit that is an under-approximation of the true answer. This is not difficult to see; step 2 tells you straight away to find a number whose square is less than the first group of digits. Therefore, that number's square root is less than the square root of the first group of digits. It is guaranteed to be the correct first digit because it is the square root of the largest perfect square that's less than the first group of digits, but nonetheless as a value in itself it is less than the true answer. Since it is easy to figure out that the first digit of the answer is an under- approximation of the true answer, it is also pretty easy to see that the second digit of the answer will be positive. The second digit has to be positive in order to bring the approximation closer to the true answer. However, it is just part of the nature of the algorithm that the second digit can "overshoot" the true answer. When that happens, the approximation changes from an under-approximation to an over-approximation, and so all your remaining digits will be negative. I leave it to cleverer minds than my own to figure out why it is possible for this second digit to overshoot the true answer (and hopefully to fix the algorithm). Finally, one last note. In the event that you choose to find the square root of a number that has a rational square root (such as 17.64, whose square root is exactly 4.2), you will find that at some instance of step 9 the subtraction comes out to exactly zero and there are no more groups of digits left to deal with that aren't "00" themselves. If that happens, you know you're done, and you have found the exact square root you're looking for (not merely an approximation of it). This is easy to prove; if you assume that the result of step 9 is exactly 0, and you follow that zero through the calculation, you'll see that all other digits produced by the algorithm will also be 0.