From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7224 invoked by alias); 7 Nov 2002 13:14:05 -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 7198 invoked from network); 7 Nov 2002 13:14:04 -0000 Received: from unknown (HELO Cantor.suse.de) (213.95.15.193) by sources.redhat.com with SMTP; 7 Nov 2002 13:14:04 -0000 Received: from Hermes.suse.de (Charybdis.suse.de [213.95.15.201]) by Cantor.suse.de (Postfix) with ESMTP id 9F8331635F; Thu, 7 Nov 2002 14:14:03 +0100 (MET) X-Authentication-Warning: sykes.suse.de: schwab set sender to schwab@suse.de using -f To: Jan Hubicka Cc: Gabriel Dos Reis , Richard Henderson , gcc-patches@gcc.gnu.org, aj@suse.de Subject: Re: Converting floor to rint References: <20021106175441.GZ22059@kam.mff.cuni.cz> <20021106180930.GA22066@redhat.com> <20021106211059.GB1316@atrey.karlin.mff.cuni.cz> <20021106222922.GH1316@atrey.karlin.mff.cuni.cz> <20021107092112.GF7964@kam.mff.cuni.cz> <20021107100359.GI7964@kam.mff.cuni.cz> <20021107125643.GA11315@atrey.karlin.mff.cuni.cz> X-Yow: .. Now I think I just reached the state of HYPERTENSION that comes JUST BEFORE you see the TOTAL at the SAFEWAY CHECKOUT COUNTER! From: Andreas Schwab Date: Thu, 07 Nov 2002 05:14:00 -0000 In-Reply-To: <20021107125643.GA11315@atrey.karlin.mff.cuni.cz> (Jan Hubicka's message of "Thu, 7 Nov 2002 13:56:43 +0100") Message-ID: User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.3.50 (ia64-suse-linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2002-11/txt/msg00446.txt.bz2 Jan Hubicka writes: |> > Jan Hubicka writes: |> > |> > [...] |> > |> > | > [#2] The rint functions differ from the nearbyint functions |> > | > (7.12.9.3) only in that the rint functions may raise the |> > | ^^^ |> > | Does this imply that I can implement rint as nearbyint call and never |> > | cause the exception and always use frndint instruction for it that does |> > | not trap? |> > |> > If FE_INEXACT is on, that is incorrect. |> But why the standard don't say that rint function will raise the |> interrupt? I would interpred may as it can behave that way or don't |> have to. Yes, rint is the weaker function. The implementation of nearbyint must make sure that no inexact exception is raised, whereas for rint this is not necessary. That means that if you have a round instruction that never raises the exception it can be used to implement both functions. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."