This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: real.c fails floating point tests



On Wed, 16 Oct 2002, Richard Henderson wrote:

> Paranoia runs vs the 160 bit internal arithmetic *will* fail,

Yes, that is what I am talking about.  The decimal<->binary
uses this arithmetic and its pathological behavior makes it
hard to test and hard to analyze.  IEEE 754 and 854 provide the
results of an analysis, telling how high the arithmetic precision
must be to meet the requirements of the standard.  That analysis
assumes the arithmetic follows the other IEEE rules and therefore
it does not apply to this situation.  That leaves us in somewhat
of a quandry.

The guard and sticky bits are not supposed to be part of the number.
They are auxiliary variables used to implement the rounding rules.  It
is OK to keep the number in an undrounded state and preserve the
sticky bit somewhere else in the data structure.  But using the bottom
bit of the number for the sticky bit does not make arithmetic sense
for the 160-bit version.

Previously the REAL_VALUE_TYPE could not contain auxiliary
information, because often it was actually just emulating a host computer
double.  If you have removed that restriction then you can put various
other items into the data structure and then it looks like it would be
simple to make the 160-bit precision follow some arithmetic rules that
are easier to analyze and test.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]