From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28030 invoked by alias); 19 Mar 2004 08:26:34 -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 27982 invoked from network); 19 Mar 2004 08:26:25 -0000 Received: from unknown (HELO sunsite.ms.mff.cuni.cz) (195.113.15.26) by sources.redhat.com with SMTP; 19 Mar 2004 08:26:25 -0000 Received: from sunsite.ms.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8) with ESMTP id i2J6GpGc013413; Fri, 19 Mar 2004 07:16:51 +0100 Received: (from jakub@localhost) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8/Submit) id i2J6GpvX013411; Fri, 19 Mar 2004 07:16:51 +0100 Date: Fri, 19 Mar 2004 12:28:00 -0000 From: Jakub Jelinek To: Thomas Kunert Cc: Roger Sayle , gcc@gcc.gnu.org Subject: Re: x87 float truncation/accuracy (gcc vs. icc/msvc) Message-ID: <20040319061651.GH6393@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek References: <405AAC97.60308@physik.tu-dresden.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <405AAC97.60308@physik.tu-dresden.de> User-Agent: Mutt/1.4i X-SW-Source: 2004-03/txt/msg01117.txt.bz2 On Fri, Mar 19, 2004 at 09:17:27AM +0100, Thomas Kunert wrote: > Roger Sayle wrote: > > >interesting is that both the Microsoft Visual C/C++ compiler and Intel's > >icc both *by default* completely optimized away this "float_truncate", > >producing incorrectly rounded results. > > > > Could you please explain what's wrong with incorrectly rounded results? > I was under the impression accuracy and performance is more important to > most people. And for the ones who actually care about rounding > there is -ffloat-store. What is this option for, if the truncation happens > anyway? OTOH ISO C99 requires certain handling of float/double which GCC on IA-32 doesn't meet even with -ffloat-store. Jakub