home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / sci / math / 15321 < prev    next >
Encoding:
Text File  |  1992-11-20  |  1.8 KB  |  39 lines

  1. Newsgroups: sci.math
  2. Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!sgi!wdl1!wdl39!mab
  3. From: mab@wdl39.wdl.loral.com (Mark A Biggar)
  4. Subject: Re: Square root
  5. Message-ID: <1992Nov20.225952.26744@wdl.loral.com>
  6. Sender: news@wdl.loral.com
  7. Organization: Loral Western Development Labs
  8. References: <n9146070.722056383@waldorf> <1992Nov19.003129.2915@galois.mit.edu>
  9. Date: Fri, 20 Nov 1992 22:59:52 GMT
  10. Lines: 27
  11.  
  12. In article <1992Nov19.003129.2915@galois.mit.edu> jbaez@riesz.mit.edu (John C. Baez) writes:
  13. >In article <n9146070.722056383@waldorf> n9146070@waldorf.cc.wwu.edu (Jacob C Kesinger) writes:
  14. >>There was a previous post about ways to find the square root of a number...
  15. >>Here's my contribution:
  16. >>Find the Taylor series about a (I used a=1, for simplicity)
  17. >>(x-1)^.5=1+ (x-1)/2- (x-1)^2/4 +3(x-1)^3/8 -......
  18. >>This is nasty, messy, ugly, and very likely wrong.  However, it IS
  19. >>a method (*grin*)
  20. >It'll work, assuming you got the right coefficients in your Taylor
  21. >series, as long as |x-1| < 1.  It's pretty good if you just want a few
  22. >digits and x is near 1.  
  23. >The best use of this formula is to impress undergraduates by working out
  24. >in your head, for example, that the square root of 1.23 is about 1.115.
  25.  
  26. This is also not bad for generating the mantissa of an initial guess
  27. when computing square roots of binary floating point numbers.  A binary
  28. floating point number (e.g. IEEE) has a mantissa that is .5<=m<1 which meets
  29. the above inequality.  After renormalizing to make the floating point exponent
  30. even you now have a mantissa that is .25<=m<1 and the inequaltity still
  31. holds, so use the above 3 or 4 terms to get the mantissa of the guess,
  32. then run 2 to 4 interations of the Newton-Raston formula to firm up the 
  33. answer and your done.  
  34.  
  35. --
  36. Mark Biggar
  37. mab@wdl1.wdl.loral.com
  38.  
  39.