home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / sci / math / 9617 < prev    next >
Encoding:
Text File  |  1992-07-28  |  1.6 KB  |  40 lines

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