home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / os2 / programm / 8054 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  1.5 KB

  1. Xref: sparky comp.os.os2.programmer:8054 comp.graphics:14250 comp.os.msdos.programmer:12489 comp.sys.ibm.pc.programmer:808
  2. Newsgroups: comp.os.os2.programmer,comp.graphics,comp.os.msdos.programmer,comp.sys.ibm.pc.programmer
  3. Path: sparky!uunet!munnari.oz.au!spool.mu.edu!yale.edu!ira.uka.de!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!sunic!ugle.unit.no!nuug!nntp.uio.no!eivind
  4. From: eivind@kih.no (eivind hagen)
  5. Subject: Re: Fixed point sqrt anyone?
  6. Message-ID: <1993Jan27.121349.9076@ulrik.uio.no>
  7. Followup-To: comp.os.os2.programmer,comp.graphics,comp.os.msdos.programmer,comp.sys.ibm.pc.programmer
  8. Sender: news@ulrik.uio.no (Mr News)
  9. Nntp-Posting-Host: samson.kih.no
  10. Organization: Kongsberg Ingeniorhogskole
  11. X-Newsreader: TIN [version 1.1 PL8]
  12. References: <Jan20.020814.50105@yuma.ACNS.ColoState.EDU>
  13. Date: Wed, 27 Jan 1993 12:13:49 GMT
  14. Lines: 16
  15.  
  16. Here's another way of calculating Sqrt, integer.
  17.  
  18. n1=4
  19. n2=5
  20. s1=n1*n1
  21. s2=n2*n2
  22.  
  23. These 4 numbers are connected, as are all similar adjacent pairs of integers
  24. and their squares. Rule : s2=s1+n1+n2
  25. Use this to move up/down till you reach the desired value in s2, then
  26. the answer is in n2 (or s1,n1 for that matter...)
  27.  
  28. I--------------------------------------I-------------------------------------I
  29. I Eivind Hagen (eivind@samson.kih.no)  I  "I've got the POWER"               I
  30. I Zynx of Arc Empire                   I  (ARM 3 + cx486slc / 8 MB RAM)      I
  31. I--------------------------------------I-------------------------------------I
  32.