From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14085 invoked by alias); 6 Nov 2002 22:55:19 -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 14053 invoked from network); 6 Nov 2002 22:55:18 -0000 Received: from unknown (HELO soliton.integrable-solutions.net) (193.51.208.204) by sources.redhat.com with SMTP; 6 Nov 2002 22:55:18 -0000 Received: (from gdr@localhost) by soliton.integrable-solutions.net (8.11.6/8.11.6/SuSE Linux 0.5) id gA6MuGZ02322; Wed, 6 Nov 2002 23:56:16 +0100 To: Jan Hubicka Cc: Richard Henderson , gcc-patches@gcc.gnu.org, aj@suse.de Subject: Re: Converting floor to rint 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> From: Gabriel Dos Reis In-Reply-To: Jan Hubicka's message of "Wed, 6 Nov 2002 23:29:22 +0100" Organization: Integrable Solutions Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII Date: Wed, 06 Nov 2002 14:55:00 -0000 Message-ID: X-SW-Source: 2002-11/txt/msg00366.txt.bz2 Jan Hubicka writes: | On the related note. How bad would you consider converting | floor(x) into rint(x-0.5) in the fast-math mode? If you think you do want to do that transformation, then I would prefer this floor(x) -> nearbyint(x-0.5) | That transformation would do a miracles for i386, where rint is faster | than floor by quite a lot and should suffice for 3D application in | reliablility. I can imagine it to fail only for very large numbers... Not really. floor(1) == 1 and rint(1 - 0.5) maybe be 0 or 1 depending on the current rounding mode. I don't think that I really like that transformation, even under -funsafe-math. But I would like to hear other people opinons. -- Gaby