Allocating extra bits for mantissa of a float

Herman Rubin cik at l.cc.purdue.edu
Fri Aug 25 23:15:13 AEST 1989


In article <13884 at netnews.upenn.edu>, rowe at 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).
> 
> I have taken some tentative steps towards defining a structure of two
> doubles, and using one for the most significant part of the number,
> and one for the least significant part.  However, I've run into
> problems even with addition of the members of such a structure due to
> the roundoff errors in the least significant digits of the most
> significant half of the structure (I hope that's clear).  I've posted
> to this newsgroup because nearly all of my programming experience is 
> in C, and I would like to solve my problem in this language.

Some machines have harware procedures for getting more floating point
precision than customary, but even this will require the use of machine
language instructions.  If these are not available, or if more precision
is needed, a multiple precision "package", which should, in general, use
the integer arithmetic, will be needed.  It may be possible to make an
appropriate modification of the algorithm to use a local expansion, in
which case multiple precision will only be required to get the constants.
< 
< Alternatively (on the off chance that anyone else has done this), what
< I'm searching for is the characteristic values that lead to periodic
< solutions (of period pi or 2*pi) of Mathieu's differential equation.
< I'm attempting to use the infinite continued fraction as originally
< determined by Ince, because it is the most general method of finding
< the characteristic value for any type or order of solution.  This
< problem only arises for the relatively high order solutions with small
< values of the variable which is usually called q.  Any better methods
< of determining the characteristic values under these conditions would
< also be appreciated.
< 
< Thanks in advance.
< 
< rowe at pender.ee.upenn.edu     (Mickey Rowe)
> 
> Alternatively (on the off chance that anyone else has done this), what
> I'm searching for is the characteristic values that lead to periodic
> solutions (of period pi or 2*pi) of Mathieu's differential equation.
> I'm attempting to use the infinite continued fraction as originally
> determined by Ince, because it is the most general method of finding
> the characteristic value for any type or order of solution.  This
> problem only arises for the relatively high order solutions with small
> values of the variable which is usually called q.  Any better methods
> of determining the characteristic values under these conditions would
> also be appreciated.
> 
> Thanks in advance.
> 
> rowe at pender.ee.upenn.edu     (Mickey Rowe)

A numerical analyst might (or might not) be able to help.
-- 
Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907
Phone: (317)494-6054
hrubin at l.cc.purdue.edu (Internet, bitnet, UUCP)



More information about the Comp.lang.c mailing list