From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12659 invoked by alias); 26 Dec 2011 13:22:37 -0000 Received: (qmail 12650 invoked by uid 22791); 26 Dec 2011 13:22:36 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from imr-da02.mx.aol.com (HELO imr-da02.mx.aol.com) (205.188.105.144) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 26 Dec 2011 13:22:22 +0000 Received: from mtaout-db02.r1000.mx.aol.com (mtaout-db02.r1000.mx.aol.com [172.29.51.194]) by imr-da02.mx.aol.com (8.14.1/8.14.1) with ESMTP id pBQDMFo6011478 for ; Mon, 26 Dec 2011 08:22:15 -0500 Received: from [192.168.0.2] (cpe-69-133-204-177.cinci.res.rr.com [69.133.204.177]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mtaout-db02.r1000.mx.aol.com (MUA/Third Party Client Interface) with ESMTPSA id D3656E000087 for ; Mon, 26 Dec 2011 08:22:14 -0500 (EST) Message-ID: <4EF87503.6070400@aol.com> Date: Mon, 26 Dec 2011 13:37:00 -0000 From: Tim Prince Reply-To: tprince@computer.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: gcc-help@gcc.gnu.org Subject: Re: Floating point performance issue References: <20111220134308.GF3072@xvii.vinc17.org> <4EF0943C.2070609@westcontrol.com> <20111220142459.GG3072@xvii.vinc17.org> <4EF0A3E5.6040406@westcontrol.com> <20111220161409.GH3072@xvii.vinc17.org> <4EF1038C.8020801@hesbynett.no> <20111223200244.GA15484@xvii.vinc17.org> <4EF5B140.6030800@hesbynett.no> <20111226005853.GI5641@xvii.vinc17.org> <4EF85C77.9060904@hesbynett.no> <20111226125938.GK5641@xvii.vinc17.org> In-Reply-To: <20111226125938.GK5641@xvii.vinc17.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit x-aol-global-disposition: G X-AOL-SCOLL-SCORE: 0:2:455752928:93952408 X-AOL-SCOLL-URL_COUNT: 0 x-aol-sid: 3039ac1d33c24ef875064836 X-AOL-IP: 69.133.204.177 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-12/txt/msg00241.txt.bz2 On 12/26/2011 7:59 AM, Vincent Lefevre wrote: > On 2011-12-26 12:37:27 +0100, David Brown wrote: >> If it matters that "a + b - c" be calculated "(a + b) - c" or "a + (b - c)", >> then use brackets. > > but brackets shouldn't change anything with -fassociative-math. > > In C, brackets are purely syntactic, i.e. a + b - c is equivalent > to (a + b) - c. This was so prior to 1989, but the rules changed with the advent of ISO standards. Even where compilers support algebraic simplification across parentheses in violation of the standards, the results are unreliable as well as non-portable. -- Tim Prince