From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25421 invoked by alias); 22 Oct 2002 18:00: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 25408 invoked from network); 22 Oct 2002 18:00:48 -0000 Received: from unknown (HELO mx2.redhat.com) (12.150.115.133) by sources.redhat.com with SMTP; 22 Oct 2002 18:00:48 -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 g9MHxoP29078; Tue, 22 Oct 2002 13:59:50 -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 g9MI0al21515; Tue, 22 Oct 2002 14:00:36 -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 g9MI0UD14547; Tue, 22 Oct 2002 11:00:30 -0700 Received: (from rth@localhost) by localhost.localdomain (8.11.6/8.11.6) id g9MI0SJ16420; Tue, 22 Oct 2002 11:00:28 -0700 X-Authentication-Warning: localhost.localdomain: rth set sender to rth@redhat.com using -f Date: Tue, 22 Oct 2002 11:56:00 -0000 From: Richard Henderson To: Robert Dewar Cc: aph@redhat.com, gcc@gcc.gnu.org Subject: Re: real.c implementation Message-ID: <20021022180028.GH16329@redhat.com> Mail-Followup-To: Richard Henderson , Robert Dewar , aph@redhat.com, gcc@gcc.gnu.org References: <20021022105831.B7E89F2D65@nile.gnat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021022105831.B7E89F2D65@nile.gnat.com> User-Agent: Mutt/1.4i X-SW-Source: 2002-10/txt/msg01355.txt.bz2 On Tue, Oct 22, 2002 at 06:58:31AM -0400, Robert Dewar wrote: > Well if you define "The Right Thing" to be what Java needs, fine, but then > this would be wrong for Ada, since Ada requires that float literals be > rounded away from infinity (0.5 always rounds up). Easy enough to handle with an argument to the real_from_string function. > What about the handling of denormals? What about them? They should work as advertized. The main reason for the recent real.c rewrite was to fix this very issue for double-extended and quad ieee formats, so if you remember problems with denormals in the past, they are in theory fixed now. You should definitely re-test. > Also, the issue of what should be done on non-IEEE machines is not clear. > For example, on the Alpha, you probably do not want to generate denormal > literals by default. We do now. We did have code in the compiler to prevent this (unconditionally, mind!) until recently; I considered this a bug and removed it. If you don't want to trap on denormals, then don't write denormal constants. Simple as that. As for truely non-ieee machines, well, we do the best we can. r~