T.R | Title | User | Personal Name | Date | Lines |
---|
485.1 | OUCH | TOOK::APPELLOF | Carl J. Appellof | Fri May 09 1986 09:51 | 4 |
| Obviously, Newton's method is not well adapted to human use.
I'll have to go get my 7th grade math book.
Thanks for the problem.
|
485.2 | square root of 79 by hand I get 8.9700 | KEEPER::KOSTAS | Kostas G. Gavrielidis <o.o> | Fri May 09 1986 09:58 | 25 |
| Well,
here is my solution to the square root of 79 by hand.
79 | 8.9700
- 64 |--------------------------------------------
-------- | 8 | 8.9 | 8.97 | 8.970 | 8.9700
15 | 8 | .9 | .7 | 0 | 0
- 8.01 |----|-------|--------|---------|----------
-------- | 64 | 8.01 | 6.279 | 0 | 0
6.990
- 6.279
--------
0.711
This means that my answer is: 8.9700
and (8.9700) * (8.9700) = 80.4609
which is greater than 79.
Enjoy,
Kostas G.
|
485.3 | | BEING::POSTPISCHIL | Always mount a scratch monkey. | Fri May 09 1986 12:44 | 12 |
| Re .1, .2:
> Obviously, Newton's method is not well adapted to human use.
I can assure you Newton did not design the method for computers. :-)
There is an algorithm for taking square roots which is akin to the
algorithm for performing long division. I was hoping somebody still
remembered such things, but if nobody enters it in a few days, I will.
-- edp
|
485.4 | | CLT::GILBERT | Juggler of Noterdom | Fri May 09 1986 13:58 | 20 |
| Well, here goes:
x� = 79. Let x = 9 - y
(9-y)� = 79, or rearranging, y� - 18y + 2 = 0. Let y = (1+z)/9.
(1+z)� - 162(1+z) + 162 = 0, or z� - 160z + 1 = 0. Let z = (1+w)/160.
(1+w)� - 160�(1+w) + 160� = 0, or w� - 25598w + 1 = 0, so that
w = 1/25600 � 0.05%.
Now for the back-substitutions:
x = 9 - (1+(1+1/25600)/160)/9
160� + 160� + 1 1
x = 9 - --------------- = 9 - - ( 1 + 1/160 + 1/(160)� )
9 * 160� 9
160� = 4096000; 1/(160)� = 0.00000024414
1/160 = 0.00625
x = 9 - 1.00625024414/9 = 9 - 0.11180558268 = 8.88819441732
|
485.5 | | BEING::POSTPISCHIL | Always mount a scratch monkey. | Fri May 09 1986 15:11 | 51 |
| I think Gilbert got lucky on that one. I don't think it can be
made into a general method. Here is the algorithm I learned:
Write the number whose square root is to be taken and determine
the first digit:
8.
____________________________
V 79
Square the first digit, subtract it from the number, and add two
more zeroes:
8.
____________________________
V 79
64
---
15 00
Double the current root, to get 16, and find the largest digit d such
that 16d times d is less than 1500. 169 times 9 is 1521, but 168
times 8 is 1344. Subtract this and add two more zeroes.
8. 8
____________________________
V 79
...
15 00
13 44
-----
1 56 00
Again, double the current root, to get 176, and find the next digit.
1769 times 9 is 15921 but 1768 times 8 is 14144. Subtract again.
8. 8 8
____________________________
V 79
...
1 56 00
1 41 44
-------
15 56 00
Repeat this one more time, to find that 17765 times 5 is 88825,
so the next digit is at least five, and we should round up the second
digit, so the answer to two digits is 8.89.
-- edp
|
485.6 | | ENGINE::ROTH | | Fri May 09 1986 19:45 | 34 |
| The root of 79 is about 9, but that's a bit high, so the root is
really about (9-x); estimate x by squaring, (9-x)**2 = 81-18*x+x**2 = 79,
or x = 2/(18-x), giving a rapidly converging sequence of approximations,
x1 = 2/18 = 1/9,
sqrt(79) ~= 9-1/9 = 8.88888888...,
x2 = 2/(18-x1) = 2/(18-1/9) = 18/(162-1) = 18/161,
sqrt(79) ~= 9-18/161 = 9*(1-2/161),
x3 = 2/(18-x2) = 2/(18-18/161) = 1/(9*(1-1/161)) = (161/160)/9,
etc
the second x is already close enough. You can see how a continued
fraction results.
I used a binary equivalent of the pencil and paper method mentioned
above in the RT-11 Fortran square root routine in the floating point
package (looooong ago). It was actually faster than using
Newton's method using fixed point multiply divide hardware (but loses
if you have floating point of course).
When I was a kid I remember using a trick to get a couple of additional
digits out of the pencil and paper root method - just divide the remainder
with twice the current estimate of the root on my slide rule and stick
the digits on the end.
There are a class of 'pseudo multiplication' algorithms for calculating
logs and doing rotations (sometimes referred to as 'CORDIC' methods)
that have a little flavor of the pencil and paper method. So much so that
I think I read that Briggs or Napier used such techniques for calculating
their tables.
- Jim
|
485.7 | | CLT::GILBERT | Juggler of Noterdom | Sat May 10 1986 00:37 | 10 |
| No, it wasn't luck, except that the numbers turned out to be easy to handle.
I took my chances posting 485.4 before checking with la computer. Apparently,
there are no silly errors:
sqrt(79) = 8.88819441732 (by hand)
sqrt(79) = 8.888194417315588850 (VAX Basic, using /Hfloat)
Oddly, *generating* the answer by hand seemed like less work than would
be required to square the answer to verify the result!
|
485.8 | sqr(79) ~~ 1351/152 | SIERRA::OSMAN | and silos to fill before I feep, and silos to fill before I feep | Mon May 12 1986 15:50 | 11 |
| Using the first five terms of the continued fraction for sqr(79),
namely [8 1 7 1 16 . . .], we get
sqr(79) = 1351/152 as a best approximation.
Squaring this is 78.9994.
This is a "best" approximation because it's the most accurate fraction
possible with such a small denominator.
/Eric
|
485.9 | Another weird method | CIMAMT::HAINSWORTH | Many pages make a thick book. | Wed Jan 27 1988 09:53 | 20 |
|
When I saw the basenote, I decided to try to do the problem WITHOUT
paper. I succeeded, though I admit that I read the replies before
I entered this note. Here's the method I used:
I first noted that 9^2 = 81, and did a first-order approximation
off of 9 to get the first digit.
Since 79 = (9 - d)^2 ~= 81 - 18d = 81 - 79 = 2,
I expect by first-order approximation that d = 2/18 ~= 0.1 .
Thus the square root is approximately 9 - 0.1 = 8.9 .
8.9^2 = 79.21 = 79 + 0.21 (I did that in my head).
8.9^2 - 8.8^2 = 0.89 + 0.88 = 1.77 (one of my favorite shortcuts).
By linear interpolation: 8.90^2 = 79 + .21
8.8x^2 = 79
8.80^2 = 79 - (1.77 - .21)
x is about 1/10 of the way down, so it's a 9, and the answer is
8.89 .
Pretty slimy, huh?
John
|