home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: sci.math
- Path: sparky!uunet!darwin.sura.net!Sirius.dfn.de!Urmel.Informatik.RWTH-Aachen.DE!kaa!dak
- From: dak@kaa.informatik.rwth-aachen.de (David Kastrup)
- Subject: Re: Square roots
- Message-ID: <dak.712407301@kaa>
- Sender: news@Urmel.Informatik.RWTH-Aachen.DE (Newsfiles Owner)
- Nntp-Posting-Host: kaa
- Organization: Rechnerbetrieb Informatik / RWTH Aachen
- References: <Bs4HD3.ID5@usenet.ucs.indiana.edu>
- Date: 29 Jul 92 10:55:01 GMT
- Lines: 32
-
- 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.
-
- Well, for natural number freaks negative numbers may seem odd, but
- usually an odd number is one not dividable by 2. So say, until
- subtraction yields a negative number (as shown by the example).
- Now (n+1)^2= n^2 + (2n + 1), meaning we get successive square numbers
- by successively adding odd numbers. All clear?
- >(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 ___/
-