home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: sci.math
- Path: sparky!uunet!newsgate.watson.ibm.com!yktnews!admin!yktnews!prener
- From: prener@watson.ibm.com (Dan Prener)
- Subject: Re: Square roots
- Sender: news@watson.ibm.com (NNTP News Poster)
- Message-ID: <PRENER.92Jul29032206@prener.watson.ibm.com>
- In-Reply-To: hpassaue@silver.ucs.indiana.edu's message of Tue, 28 Jul 1992 23:31:50 GMT
- Date: Wed, 29 Jul 1992 08:22:06 GMT
- Disclaimer: This posting represents the poster's views, not necessarily those of IBM
- References: <Bs4HD3.ID5@usenet.ucs.indiana.edu>
- Nntp-Posting-Host: prener.watson.ibm.com
- Organization: IBM T.J. Watson Research Center, Hawthorne, New York
- Lines: 25
-
- In article <Bs4HD3.ID5@usenet.ucs.indiana.edu> hpassaue@silver.ucs.indiana.edu (Billy Passauer) writes:
-
- >I ran across this algorithm for finding the square root of a number a
- >long time ago. I was wondering if someone could tell me where I could
- >find more information about it.
-
- >To find the INTEGER portion of a square root:
- > Take the number you want the square root of, and successively
- >subtract the odd numbers (starting with 1.) Each time the result is
- >positive, add 1 to a counter. Repeat with the new number. When the
- >subtraction yields an odd number, the counter contains the answer.
- >(integer only) For instance the square root of 24:
-
- > Counter
- > 24 - 1 = 23 : 1
- > 23 - 3 = 20 : 2
- > 20 - 5 = 15 : 3
- > 15 - 7 = 8 : 4
- > 8 - 9 = <0
-
- >Any information about this would be greatly appreciated.
-
- Hint: What is the sum of the first N odd numbers?
- --
- Dan Prener (prener@watson.ibm.com)
-