From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16383 invoked by alias); 18 Oct 2002 12:42:49 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 16165 invoked from network); 18 Oct 2002 12:42:44 -0000 Received: from unknown (HELO moshier.moshier.net) (24.61.24.32) by sources.redhat.com with SMTP; 18 Oct 2002 12:42:44 -0000 Received: from www.moshier.net (moshier.ne.client2.attbi.com [24.61.24.32]) by moshier.moshier.net (8.11.6/8.11.6/SuSE Linux 0.5) with ESMTP id g9ICgc629024; Fri, 18 Oct 2002 08:42:39 -0400 Date: Fri, 18 Oct 2002 07:32:00 -0000 From: Stephen L Moshier To: Richard Henderson cc: gcc@gcc.gnu.org Subject: Re: real.c fails floating point tests In-Reply-To: <20021016233835.GG30823@redhat.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-10/txt/msg01103.txt.bz2 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.