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