Thursday, April 28, 2011

In Case You Wondered…

Very recently I discussed fractional exponents. In that routine I used only multiplications, divisions, and pulling square roots. But what about pulling square roots by hand? There is a simple formula for that. Alas, it is iterative. Here it is:

square root (eventually) = ½ * ((number /guess) + guess)

A straightforward “guess” is simply to divide the number by two. Let me demonstrate this formula by iteration. Let’s say that we want the square root of 3.13. That will be our number. Half of that is 1.565. That will be our guess.

IterationResult of EquationResult x Result
11.78253.1773062500
21.76923036473.1301760832
31.76918060203.1300000025
41.76918060133.13

In the first iteration, the guess is 1.565. In each successive iteration, the guess used is the result of the last operation. Thus in Iteration 2 the guess is 1.7825. And so on. We stop as soon as result times result is our number.

The bigger the number, the more iterations. The square root of my year of birth (1936) is 44. That took 9 iterations. The square root of 9,876,543.21 is 3142.696804—and that took 15 rounds of what are simply three of the four basic arithmetic operations of multiplication, division, addition, and subtraction.

If you absolutely insist on doing things by hand, it is easy to automate square root pulling in Visual Basic or whatever language you prefer. And such a subroutine could be built into the code I’ve devised (and point to in the earlier posting) to make the operation as “pure” as possible.

0 comments:

Post a Comment