From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4882 invoked by alias); 6 Nov 2002 22:47:40 -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 4867 invoked from network); 6 Nov 2002 22:47:38 -0000 Received: from unknown (HELO mx2.redhat.com) (12.150.115.133) by sources.redhat.com with SMTP; 6 Nov 2002 22:47: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 gA6Mk1P26614; Wed, 6 Nov 2002 17:46:01 -0500 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 gA6MlRl29475; Wed, 6 Nov 2002 17:47:27 -0500 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 gA6MlQD06444; Wed, 6 Nov 2002 14:47:26 -0800 Received: (from rth@localhost) by localhost.localdomain (8.11.6/8.11.6) id gA6MlLt22416; Wed, 6 Nov 2002 14:47:21 -0800 X-Authentication-Warning: localhost.localdomain: rth set sender to rth@redhat.com using -f Date: Wed, 06 Nov 2002 14:47:00 -0000 From: Richard Henderson To: Jan Hubicka Cc: Gabriel Dos Reis , gcc-patches@gcc.gnu.org, aj@suse.de Subject: Re: Converting floor to rint Message-ID: <20021106224721.GK22215@redhat.com> Mail-Followup-To: Richard Henderson , Jan Hubicka , Gabriel Dos Reis , gcc-patches@gcc.gnu.org, aj@suse.de References: <20021105171400.GX14655@kam.mff.cuni.cz> <20021105173800.GD20534@redhat.com> <20021106092310.GE22059@kam.mff.cuni.cz> <20021106175441.GZ22059@kam.mff.cuni.cz> <20021106180930.GA22066@redhat.com> <20021106211059.GB1316@atrey.karlin.mff.cuni.cz> <20021106222922.GH1316@atrey.karlin.mff.cuni.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021106222922.GH1316@atrey.karlin.mff.cuni.cz> User-Agent: Mutt/1.4i X-SW-Source: 2002-11/txt/msg00362.txt.bz2 On Wed, Nov 06, 2002 at 11:29:22PM +0100, Jan Hubicka wrote: > On the related note. How bad would you consider converting > floor(x) into rint(x-0.5) in the fast-math mode? Well, let's see... If the current rounding mode is FE_UPWARD, then rint(1.7 - 0.5) = rint(1.2) = 2.0 I.e. we'd be computing CEIL instead of FLOOR. If the current rounding mode is FE_TONEAREST, which is the case I assume you were thinking about, we round ties to even, so rint(5.0 - 0.5) = rint(4.5) = 4.0 instead of the expected value 5.0. So, I think this would be a very bad idea, even for -ffast-math. r~