home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: sci.math
- Path: sparky!uunet!paladin.american.edu!darwin.sura.net!wupost!usc!sol.ctr.columbia.edu!usenet.ucs.indiana.edu!silver.ucs.indiana.edu!hpassaue
- From: hpassaue@silver.ucs.indiana.edu (Billy Passauer)
- Subject: Square roots
- Message-ID: <Bs4HD3.ID5@usenet.ucs.indiana.edu>
- Sender: news@usenet.ucs.indiana.edu (USENET News System)
- Nntp-Posting-Host: silver.ucs.indiana.edu
- Organization: Indiana University
- Date: Tue, 28 Jul 1992 23:31:50 GMT
- Lines: 24
-
- 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.
- --
- _
- /_) * / / / / hpassaue@silver.ucs.indiana.edu
- /__) / (__ (__ (__/ hpassaue@ucs.indiana.edu
- Passauer ___/
-