Estimate sqrt(17):
Clearly it has to be between 4 and 5.
Try 4.5. Result: 20.25 Try 4.2. Result: 17.64 Try 4.1. Result: 16.81 Try 4.15. Result: 17.01. Probably good enough for most practical purposes.
Estimate sqrt(17):
Clearly it has to be between 4 and 5.
Try 4.5. Result: 20.25 Try 4.2. Result: 17.64 Try 4.1. Result: 16.81 Try 4.15. Result: 17.01. Probably good enough for most practical purposes.
In this case the value is sanity checking a calculator / program.
Were any memory tricks involved (e.g. pegs, palaces) or did he just go through a table of square roots every morning?
His justification for starting was trying to keep track of the order of magnitude of everything he calculated to catch fat finger mistakes. And a sanity check. However, you need a few digits on the front of a number before you can really safely keep track of exponents that way.
There are 12 numbers from 4.0 through 5.0 inclusive - in steps of 0.1, and there are 10 integer numbers from 16 through 25 inclusive - clearly there's an uneven, but still somewhat smooth mapping from one through the other via the square function (or root function, for that matter). It's easy to see (note that python rounds down up to .5 inclusive):
for i in range(40, 51):
n=i/10.0
print(n, round(n**2))
4.0 16
4.1 17
4.2 18
4.3 18
4.4 19
4.5 20
4.6 21
4.7 22
4.8 23
4.9 24
5.0 25
Now, for a computer algorithm, the couple of extra steps by using binary search doesn't really matter, but I find that when doing math by hand, it can be a great benefit to avail oneself of intuition, to be able to skip a few steps - especially when working in this manner where you "check your guess" at every step - so you won't risk a wrong answer, the only risk is wasted work.This is indeed a bit different when approximating a more complicated function, eg one that doesn't monotonically increase/decrease.
Since the term q for solving the remainder r for any step as in the binomial r = x2 - 4p2 - q(4p + q) is either 1 or 0 in a base-2 system, evaluating the "fit" becomes merely a matter of testing a boolean value. (Therefor we can go for a straight-forward algorithm. No need for interpolations, here.)
So 4^2 = 16 is under by 1, add 0.1. 4.1^2 = 16.81 is off by around .2, add 0.02. 4.12^2 = 16.9744 so add .003. You're basically adding a digit at a time without needing division.
17 is a bit over 5·5·2/3, which is a bit under 2^(1.4 + 1.4 + 1 – 1.7) = 2^4.1 [base 12], now to take the square root we get 2^2.06 ~ 4·35/34 [base 10], but we want something a bit higher, so for a round number to cancel the 4 we can guess 4·33/32 = 33/8 [base 10].
3 ~ 2^(19/12) -> lg 3 ~ 1;7 or to be more precise 1;703
5 ~ 2^(7/3) = 2^(28/12) -> lg 5 ~ 2;4 or to be more precise 2;3a4
This makes 2^0;7 just about exactly a “perfect fifth” 3/2 (off by about .1%), and 2^0;4 almost a “major third” 5/4 (off by .8%).
If you step up a scale by 2^(1/12) or in log scale 0;1 increments, you can find close fractional approximations to most of the steps. Then I happen to also know that 0;06 is ~lg 35/34, but that one obviously isn’t nearly as important or easy to work with.