Re: integer cube root ...
- From: glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 28 Feb 2006 21:43:49 +0000 (UTC)
Gerard Schildberger <Gerard46@xxxxxxx> wrote:
What I'm looking for is a specific routine just for integer cube roots,
similar to the integer square root (above), which isn't (as far as I
know, an integer version of Newton's method). I know there is one, and
I was hoping that somebody whould know of it (or where it is on the www).
The general routine (above) for any root seems like overkill for what I
wanted to do. __________________________________________________Gerard S.
Find a book an how to use an abacus that includes square
and cube roots. I once bought a cheap abacus in a chinatown
store that included a little book.
For the square root algorithm, similar to the integer square
root algorithm you mention, successive odd integers are subtracted
from the high digit, and the number of such is counted.
(The sum of the first n odd integers is n**2.)
(Though with a shift of the decimal point it will work for
fixed point non-integer numbers, too.)
Then there is a correction when you shift to the next lower digits
(one in the accumulating square root, and two in the ever decreasing
starting number.) The square root algorithm comes from the identity
(10A+B)**2=100A+20AB+B**2
The cube root algorithm takes three sets of abacus columns,
accumulating x and x**2 while reducing the original number by x**3.
(For more digits you put two abaci side by side.)
See: http://hem.passagen.se/ceem/china.htm
The cube root algorithm comes from:
(10A+B)**3=1000A**3+300*A**2*B+30*A*B**2+B**3
-- glen
.
- Follow-Ups:
- Re: integer cube root ...
- From: Gerard Schildberger
- Re: integer cube root ...
- References:
- integer cube root ...
- From: Gerard Schildberger
- Re: integer cube root ...
- From: John W. Kennedy
- Re: integer cube root ...
- From: N. Shamsundar
- Re: integer cube root ...
- From: Gerard Schildberger
- integer cube root ...
- Prev by Date: Re: integer cube root ...
- Next by Date: Re: integer cube root ...
- Previous by thread: Re: integer cube root ...
- Next by thread: Re: integer cube root ...
- Index(es):
Relevant Pages
|