From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13402 invoked by alias); 26 Mar 2004 18:22:15 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 13393 invoked from network); 26 Mar 2004 18:22:14 -0000 Received: from unknown (HELO nile.gnat.com) (205.232.38.5) by sources.redhat.com with SMTP; 26 Mar 2004 18:22:14 -0000 Received: from localhost (localhost [127.0.0.1]) by nile.gnat.com (Postfix) with ESMTP id 27D64F2DB7; Fri, 26 Mar 2004 13:22:14 -0500 (EST) Received: from nile.gnat.com ([127.0.0.1]) by localhost (nile.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 19660-01-7; Fri, 26 Mar 2004 13:22:13 -0500 (EST) Received: from gnat.com (hoosic.gnat.com [205.232.38.102]) by nile.gnat.com (Postfix) with ESMTP id D73EBF2DAC; Fri, 26 Mar 2004 13:22:13 -0500 (EST) Message-ID: <406474D6.7090705@gnat.com> Date: Fri, 26 Mar 2004 20:06:00 -0000 From: Robert Dewar User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 MIME-Version: 1.0 To: Joe Buck Cc: gcc@gcc.gnu.org Subject: Re: -ffast-math and floating point reordering References: <20040324170719.A12420@synopsys.com> <4062763B.1030103@gnat.com> <20040325090944.A12597@synopsys.com> In-Reply-To: <20040325090944.A12597@synopsys.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at nile.gnat.com X-SW-Source: 2004-03/txt/msg01570.txt.bz2 Joe Buck wrote: > On Thu, Mar 25, 2004 at 01:03:39AM -0500, Robert Dewar wrote: > What is "model interval"? Brief answer (long answer is too long). When the result of an fpt operation is exactly representable, the model interval is the set consisting of this one number. When the result is not exactly representable, then the model interval is the range of results between the two representable values surrounding the true real result, including the end points. Generally any value within the model interval can be returned, either end point, or, using temporary excess precision, some value in between. An optimization like reassociation is permitted only if the result is within the model interval of the original result as defined by the canonical semantics. This is quite a strict criterion. For example in Ada 83, it forbod the optimization of x**4 to x**2**2, because there are cases where the latter is less accurate and lies outside the model interval of x*x*x*x, which is the canonical semantic result. This particular effect was unintended (it is a bit of a surprise to some that x**2**2 which has one less multiplication, can be less accurate :-) So in Ada 95 reassociation is explicitly permitted in computing x**j for integer exponent j.