From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13798 invoked by alias); 5 Nov 2002 19:14:10 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 13745 invoked from network); 5 Nov 2002 19:14:09 -0000 Received: from unknown (HELO desire.geoffk.org) (12.235.56.190) by sources.redhat.com with SMTP; 5 Nov 2002 19:14:09 -0000 Received: (from geoffk@localhost) by desire.geoffk.org (8.11.6/8.11.6) id gA5JDqB31144; Tue, 5 Nov 2002 11:13:52 -0800 X-Authentication-Warning: desire.geoffk.org: geoffk set sender to geoffk@geoffk.org using -f To: Jan Hubicka CC: gcc-patches@gcc.gnu.org Subject: Re: Simplify floating point conversions References: <20021105171400.GX14655@kam.mff.cuni.cz> From: Geoff Keating Date: Tue, 05 Nov 2002 11:14:00 -0000 In-Reply-To: <20021105171400.GX14655@kam.mff.cuni.cz> Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-11/txt/msg00224.txt.bz2 Jan Hubicka writes: > Hi, > this patch makes us to simplify some of the floating point operations to > narrower mode when conversions are present. This include > +,-,/,*,abs,neg,sqrt/sin/cos/exp. > I believe it is IEEE safe, but some expert would be welcome. It's not safe, except for 'abs' and 'neg'. For example, (float)sqrt(2.0 * FLT_MAX) != sqrtf(2.0 * FLT_MAX). I think it would be OK for -ffast-math, though. -- - Geoffrey Keating