6 ms·
The Lost Art of Manually Calculating Square Roots
- nils-m-holm 9y agoNice! But even Newton's method works fine on a sheet of paper!
- Turing_Machine 9y agoEven rough interpolation converges pretty fast for plain vanilla square roots, especially if you don't need an answer accurate to more than a few decimals. Newton-Raphson or more sophisticated methods can be a big win for more complicated functions, of course. 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.
- Retric 9y agoAn engineer friend memorized the first 4 digits of all square roots from 1 to 100 which you can quickly turn into a great approximation. AKA sqrt(1730) is between 4.123 * 10 and 4.242 * 10. Even better 30 is low so it's between 41.23 and (4.242+4.123) / 2 * 10 = 41.825. In this case the value is sanity checking a calculator / program.
- tpeo 9y agoWhy would he do that, though? I do think it's neat, but I think most people would just memorize an algorithm instead. Were any memory tricks involved (e.g. pegs, palaces) or did he just go through a table of square roots every morning?
- Retric 9y agoI assume because he regularly worked with formulas involving squares and square roots. This is a guy who did long division in his head on long car rides to stay awake. He also memorized the square and cube of every number from 1 to 100. 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.
- jacobolus 9y agoMemorizing a log table is a heck of a lot better bang for the buck than memorizing square roots, cube roots, etc.
- e12e 9y agoActually, it's clearly much closer to 4 than 5 - So I'd probably start at 4.1 or 4.2. 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.
- btilly 9y agoI'd tackle this in my head by realizing the answer is close to 4, and the derivative of sqrt near 16 is about 1/(2 sqrt(16)) = 1/8 which is not far from 1/10. So always round up. 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.
- jacobolus 9y agoI like doing this kind of estimation via binary logs expressed in base 12. 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].
- btilly 9y agoBase 12 is more efficient for arithmetic, but I never really mastered it. And converting back and forth seems to me to be more trouble than it is worth.
- jacobolus 9y agoIt’s only the binary logs that need to be base 12. This is the approximations inherent in the 12-step-per-octave equal-tempered Western music scale. Memorizing just two facts gets you a long way: 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.
- masswerk 9y agoMind that there is no need for estimates and backtracking when doing it in binary! 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.)
- sohkamyung 9y agoThere are many methods for calculating square roots [1]. The article explain the Digit-by-Digit with Decimal (base 10) method, I believe, and explains it quite well. [1] [ https://en.wikipedia.org/wiki/Methods_of_computing_square_roots https://en.wikipedia.org/wiki/Methods_of_computing_square_ro... ]
- ballenf 9y agoThe babylonian method is, imo, easier to remember and perform than the "lost art" presented here: Start with a ball park estimate of the root of x, then take an average of (estimate + x / the estimate). That's your new estimate. Rinse and repeat until convergence to an acceptable degree. The biggest drawback if doing this by hand is the division problem can be a pain. I see the attraction and "purity" of the proposed lost art.
- Houshalter 9y agoDivision is much harder than multiplication. Even for computers. It's easier to just square your estimate and see how close it is. Then increase or decrease it proportional to how much closer you are getting.
- nicolapede 9y agoFascinating, I didn't know the babylonian method -- it sounds equivalent to Newton's.
- mark-r 9y agoI had always thought of this as Newton's Method too, but that's because I was simply misremembering the fullness of Newton's Method [1]. I'm grateful for the education. https://en.wikipedia.org/wiki/Newton%27s_method https://en.wikipedia.org/wiki/Newton%27s_method
- jostylr 9y agoIt is equivalent when applied to the function f(a) = a^(1/2) - x. Also, one needs to divide by 2 since if a is the square root of x, then a+x/a = a + a = 2a. n-th roots are not quite as nice, but still work fairly simply: ((n-1) a + x/a^(n-1) )/n You can see that the fixed point (a = nth root of x) works out as it should.
- chirau 9y agoHow is this a 'lost art'? I had to do this in college. Didn't we all?
- jameskilton 9y agoI graduated highschool in 2002 and college in 2006. I've never done square roots by hand or even seen how it would be done until now.
- cavDXF 9y agoI did. (as a millenial) I didn't even study a subject connected to mathematics. I came across it and thought it was neat, so i learned it... but forgot it.
- tjr 9y agoI sometimes relax my mind and drift off to sleep by doing basic square root calculations in my head.
- steaknsteak 9y agoI graduated college a year ago and I'm not sure if I've ever in my life been asked to manually compute a square root (except for a perfect square integer).
- yazan94 9y agoSame here. And I distinctly remember asking a math teacher in middle school if a number was a perfect square and we manually ended up checking and incrementing numbers until we decided that the number was not. It makes me think that this was possibly not such a common task to assign in school?
- dmoy 9y agoDepends on your course load. My EE courses forced you to do this (and then forced you to do it in hardware... on a crappy chip that I swear lacked an overflow bit, but my memory is fuzzy).
- deathanatos 9y ago
- kronos29296 9y agoBeen a long time since I saw this. Reminds of School math. Nowadays sqrt is just a calculator button press away and so I have all but forgotten how to do this. This refreshed my memory.
- cblock811 9y agoJust because we don't do something anymore that doesn't make it a "lost art".
- simplicio 9y agoDefinition of lost art : something usually requiring some skill that not many people do any more ex: Writing letters has become something of a lost art. "https://www.merriam-webster.com/dictionary/lost%20art" https://www.merriam-webster.com/dictionary/lost%20art"
- cblock811 9y agoI cant help but chuckle at the exact definition being thrown at me. I guess that by definition this is a lost art. I still think it's a bit over the top though.
- simplicio 9y agoI hear what your saying, taken individually you'd think a "lost art" would literally be an art no one remembers how to do. But like a lot of compound words and phrases in English, its actual meaning as used is different. In my experience, its pretty much always used in the sense of the article. (SNL had a whole bit on this back in the 90's: "a chickpea is neither a chick nor a pea, discuss")
- reacweb 9y agoMy mother taught it me when I was 12. Normally it is presented like a division. At 17, I have coded it in turbo pascal with arrays of digits. If I remember well, I had found a way to apply the same method for cubic roots.
- scottLobster 9y agoInteresting. I was always taught to simply reduce the square roots as much as possible (ie sqrt(8) = 2*sqrt(2)) and leave the square roots, as it's often more precise than an arbitrary number of decimals.
- BrandoElFollito 9y agoThanks for that, it's an interesting approach, never heard of it before. I will have a closer look at the precision.
- latkin 9y agoI must be missing something silly. What is the purpose of the original rectangle? This describes how to find the side length of the square, who's area is smaller than the rectangle.
- Mithorium 9y agoI was wondering that too, the best I could come up with is that the unused part of the rectangle represents the remainder we haven't "pulled down" yet, so in the first iteration, 0.17 I don't think its important to the calculation though
- breadbox 9y agoI believe it's just a visual aid that can help you understand how each digit is converging on the true square root. If you're not one for visual analogies, then it probably just feels like a distraction.
- masswerk 9y agoThose who interested in how to go from there to computer algorithm may have a look at http://www.masswerk.at/spacewar/inside/insidespacewar-pt6-gravity.html#square_roots http://www.masswerk.at/spacewar/inside/insidespacewar-pt6-gr... This is part of an excursus trying to explain, how basic math was implemented on the DEC PDP-1, namely in Spacewar!, the first digital video game (1961/62). The excursus starts at http://www.masswerk.at/spacewar/inside/insidespacewar-pt6-gravity.html#excursus http://www.masswerk.at/spacewar/inside/insidespacewar-pt6-gr... (there's a tab on the bottom right for an instruction list of the PDP-1, mind that the PDP-1 uses 1's-complement for negative numbers).
- schoen 9y agoThis reminds me of the story of Feynman beating the abacist http://www.ee.ryerson.ca/~elf/abacus/feynman.html http://www.ee.ryerson.ca/~elf/abacus/feynman.html However, the correct Portuguese for "cube roots" is "raízes cúbicas", not "raios cubicos"(—edited with thanks to JetSpiegel for the correction!). I've thought that Feynman may have been better at speaking Portuguese than at spelling it, or that most of Surely You're Joking may have been transcribed from tapes by Ralph Leighton, who probably didn't speak Portuguese.) Edit: Also, I was partly inspired to learn Portuguese by Richard Feynman. I didn't imagine that that would lead to complaining about his spelling. :-)
- JetSpiegel 9y agoIt's actually "raízes cúbicas", "raiz" is female. I'm impressed to see "multiplicação" correctly written in an English language page, usually everyone ignores tildes and ç, but they are important.
- schoen 9y agoOh gosh, thanks for the correction. I searched for what I thought it was and found lots of native speakers using the form that matched my intuition—but that didn't make it correct. :-)
- Terr_ 9y agoHuh, I thought this was going to be about Taylor Series.
- ihaveahadron 9y agoYea u now how to operate a calculator. U DONT now Math. Maybe u want that. But you dont now any fucking math u innumerate retards.
- pasta 9y agoIt's strange that it never occured to me that the square root also can be used to calculate the sides of a square. That's because in Dutch we just call it 'root' (wortel). I really wish teachers used more graphic forms in math because it helps to understand what kind of problems it can solve.
- madcaptenor 9y agoSo what do you call the cube root?
- BrandoElFollito 9y agoIsn't wortel a short form ? (I do not speak Dutch). I am asking because in France we have the official term racine carrée (square root), abbreviated to racine (root) when the "square" is implied.
- OJFord 9y agoIn English, too.
- mml 9y agofwiw, I learned to compute square roots in school in the 80s (I think it was the estimation method, which I was extremely bad at). Calculators of any kind were forbidden at school, which sucked, if you had one of those cool Casio watch calculators. Shorts were also forbidden, because suffering is good for you, apparently. I've never had to do it since, of course. Though I do now wear shorts on occasion.
- Osmium 9y ago> fwiw, I learned to compute square roots in school in the 80s FWIW, I did too in the 90s/00s, though I confess I don't remember the method now. I think it was Newton-Rhaphson.
- lukaa 9y agoIn my college professor offered passing grade immediately to someone who could manually calculate root.Nobody knew,although everyone learned it in high school.It's amazing how much people today depend on computer.In some sense all that automation makes us stupid.
- deleted 9y ago[deleted]
- SeanLuke 9y agoThis seems like a really hard way to calculate square roots. Why not just use bracketing? 1. Pick a number HI whose square is obviously higher than N. 2. Pick a number LO whose square is obviously lower than N. 3. Choose a number MED which is roughly (HI+LO)/2. 4. If MED * MED > N, replace HI with MED, else replace LO with MED. 5. Go to 3. 6. MED converges to your answer. Doesn't converge quite as fast maybe, but a million times easier to grok. I got to where the author got, ~87.8, in 8 iterations even with terrible initial HI and LO guesses (100 and 50 respectively).
- dozzie 9y ago> Doesn't converge quite as fast maybe, but a million times easier to grok. What didn't you understand about manually calculating square roots? Because your method requires tons of troublesome multiplication of numbers that get longer with each step.
- BoiledCabbage 9y ago> What didn't you understand about manually calculating square roots? Why would you be both insulting and wrong in the same post? Or did you think that multiplication somehow isn't manual? Next time work on phrasing your comment a bit better. It makes the world a better place.
- SeanLuke 9y agoI did it manually.
- sevensor 9y agoI think faster convergence is the answer. Also, I like the geometric argument in the post. But you're right, bracketing is pretty obvious, and it's the way I approximate square roots in my head.
- mpweiher 9y agoWhat's lost about it? When I first came to the US aged 12 I was confronted with an entrance exam for the school we had chosen. The math part had this weird American division symbol I had never seen before, and the closest thing I had seen was square root. Which I found a bit ambitious, but I went ahead and did the square roots. They accepted me despite the fact that I couldn't do division, but put me in the "remedial math" class. Got out of it when I did the in-class "calculator exercises" (weird concept, that) in my head, faster than anyone with the calculator.
- quantum_state 9y agojust to add to the conversation ... once one learns algebra and expresses a number as polynomial of 10, one can just derive the usual manual algorithm for any integer root ... though it gets tedious very quickly with hisgher roots ... in addition to methods using Taylor expansion and such ... maybe this is a reason why there is no need to teach it ... apart from the practical reason of a calculator can do it much quicker ...
- minademian 9y agothe most un-Medium article I've read on Medium in a long time. great execution!
- Fire-Dragon-DoL 9y agoI actually studied how to resolve square roots by hand in school. It looked like solving a division with some different rules. I honestly don't remember the process but can definitely get my math homeworks and find them (yes I still have them!). I'm 28 years old, so it's not that far come on :P