From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32292 invoked by alias); 16 Oct 2002 23:38:39 -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 32285 invoked from network); 16 Oct 2002 23:38:38 -0000 Received: from unknown (HELO mx2.redhat.com) (12.150.115.133) by sources.redhat.com with SMTP; 16 Oct 2002 23:38:38 -0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.11.6/8.11.6) with ESMTP id g9GNbts23063; Wed, 16 Oct 2002 19:37:55 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g9GNcbl17293; Wed, 16 Oct 2002 19:38:38 -0400 Received: from localhost.localdomain (frothingslosh.sfbay.redhat.com [172.16.24.27]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id g9GNcbD18676; Wed, 16 Oct 2002 16:38:37 -0700 Received: (from rth@localhost) by localhost.localdomain (8.11.6/8.11.6) id g9GNcZB31152; Wed, 16 Oct 2002 16:38:35 -0700 X-Authentication-Warning: localhost.localdomain: rth set sender to rth@redhat.com using -f Date: Wed, 16 Oct 2002 21:16:00 -0000 From: Richard Henderson To: Stephen L Moshier Cc: gcc@gcc.gnu.org Subject: Re: real.c fails floating point tests Message-ID: <20021016233835.GG30823@redhat.com> Mail-Followup-To: Richard Henderson , Stephen L Moshier , gcc@gcc.gnu.org References: <20021016220028.GB30823@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-SW-Source: 2002-10/txt/msg01027.txt.bz2 On Wed, Oct 16, 2002 at 06:54:35PM -0400, Stephen L Moshier wrote: > That does not test the 160-bit internal arithmetic, which is what the posted > report was all about. We seem to be talking about different things there. Apparently. Paranoia runs vs the 160 bit internal arithmetic *will* fail, because the internal arithmetic (1) doesn't round and (2) doesn't implement guard digits. This is because it is expected that the extra precision of the internal representation *is* the guard digit. The results will be correct after rounding for some smaller external format. As far as I can tell, the old real.c implementation was the same in this respect. > Also, beware that contrib/paranoia.cc is currently a watered-down test > because the log, exp, pow functions use the host computer's math > library instead of the arithmetic supposedly under test. Yeah, well, I tried to write log/exp/pow routines that didn't get too fresh with the representation, and yet produced result that were sufficiently accurate, but failed. Note that substituting native fpu arithmetic into these routines didn't change this failure, so I don't believe this is a flaw in the real.c routines, merely that it is quite difficult to write accurate libm routines. > I am mainly concerned about the decimal <-> binary conversion, which > does exercise the internal arithmetic. I'll continue to test and > post decimal-binary cases as time permits. Please do. r~