Allocating extra bits for mantissa of a float

Mickey Rowe rowe at pender.ee.upenn.edu
Fri Aug 25 08:37:16 AEST 1989


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.

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)



More information about the Comp.lang.c mailing list