Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!novavax!twwells!bill From: bill@twwells.com (T. William Wells) Newsgroups: comp.lang.c Subject: Re: Allocating extra bits for mantissa of a float Keywords: significant figures Message-ID: <1989Aug25.131134.10149@twwells.com> Date: 25 Aug 89 13:11:34 GMT References: <13884@netnews.upenn.edu> Distribution: usa Organization: None, Ft. Lauderdale, FL Lines: 24 In article <13884@netnews.upenn.edu> rowe@pender.ee.upenn.edu (Mickey Rowe) writes: : I'm trying to find the zeroes of a function that blows up in an : extremely narrow range. To find these zeroes, I'm searching for : places where the function becomes negative. My problem is that the : width of the curve where the function is negative may be smaller than : 1e-16 where the value of the indepenent variable is on the order of : 1e+2. This requires that the mantissa of my variable retain at least : (in some cases probably more) 18 significant figures. Is there any : (even remotely simple) way to get such precision without building my : own computer? I am currently working on a sun (I'm not sure of more : than that except that it uses SunOS release 4.0). You've been spoiled by floating point! :-) Seriously though, unless the computation requires a large exponent range, do everything in fixed point, using as many shorts as you might need to get the precision you want. Or even implement floating point with your own exponent and mantissa in a structure. Either way will give you complete control over precision and the like. Of course, they may also be slower.... --- Bill { uunet | novavax | ankh | sunvice } !twwells!bill bill@twwells.com