From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9065 invoked by alias); 7 Nov 2002 13:22:46 -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 9056 invoked from network); 7 Nov 2002 13:22:43 -0000 Received: from unknown (HELO soliton.integrable-solutions.net) (193.51.208.204) by sources.redhat.com with SMTP; 7 Nov 2002 13:22:43 -0000 Received: (from gdr@localhost) by soliton.integrable-solutions.net (8.11.6/8.11.6/SuSE Linux 0.5) id gA7DNhI06912; Thu, 7 Nov 2002 14:23:43 +0100 To: Jan Hubicka Cc: 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> From: Gabriel Dos Reis In-Reply-To: Jan Hubicka's message of "Thu, 7 Nov 2002 13:56:43 +0100" Organization: Integrable Solutions Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII Date: Thu, 07 Nov 2002 05:22:00 -0000 Message-ID: X-SW-Source: 2002-11/txt/msg00447.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? Sorry for having been unclear. "may" part refers to the fact whether the programmer might want to run rint() under a particular floating-point control mode that would permit rint() to raise the inexact exception. rint() cannot unconditionally set it. If FENV_ACCESS is on and FE_INEXACT is supported then rint() should raise the exception if appropriate. That is my understanding. Am I still unclear? -- Gaby