From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23136 invoked by alias); 15 Mar 2004 03:05:45 -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 23121 invoked from network); 15 Mar 2004 03:05:44 -0000 Received: from unknown (HELO uniton.integrable-solutions.net) (62.212.99.186) by sources.redhat.com with SMTP; 15 Mar 2004 03:05:44 -0000 Received: from uniton.integrable-solutions.net (localhost [127.0.0.1]) by uniton.integrable-solutions.net (8.12.3/8.12.3/SuSE Linux 0.6) with ESMTP id i2F2t89b013731; Mon, 15 Mar 2004 03:55:08 +0100 Received: (from gdr@localhost) by uniton.integrable-solutions.net (8.12.3/8.12.3/Submit) id i2F2t8eX013730; Mon, 15 Mar 2004 03:55:08 +0100 X-Authentication-Warning: uniton.integrable-solutions.net: gdr set sender to gdr@integrable-solutions.net using -f To: Scott Robert Ladd Cc: Roger Sayle , gcc@gcc.gnu.org Subject: Re: GCC viciously beaten by ICC in trig test! References: <40551459.8050909@coyotegulch.com> From: Gabriel Dos Reis In-Reply-To: <40551459.8050909@coyotegulch.com> Organization: Integrable Solutions Date: Mon, 15 Mar 2004 03:05:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-03/txt/msg00653.txt.bz2 Scott Robert Ladd writes: | Roger Sayle wrote: | > Consider the following: | > #include | > double doit(double a) { return sin(a) * sin(a); } | > Compiling with gcc -O2 -ffast-math on Linux generates x86 code that's | > significantly slower than Intel's compiler output. However, | > commenting out the "#include " corrects the situation and GCC | > can then generate *exactly* the same sequence as icc. | | Wonderful! This is *exactly* the insight I was looking for... Note that it has been reported in the past the the x86 native instruction fsin yields incorrect results for values outside or a certain interval (I can't remember which exactly). [...] | Sometimes, I wonder if GCC should ship its own Standard C library, just | as it ships a Standard C++ template library. However, I suspect the | suggesting such a move might be a bit controversial... ;) Yep, but it would make V3 happy ;-) -- Gaby