public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Thomas Kunert <kunert@physik.tu-dresden.de>
To: Roger Sayle <roger@eyesopen.com>
Cc: gcc@gcc.gnu.org
Subject: Re: x87 float truncation/accuracy (gcc vs. icc/msvc)
Date: Fri, 19 Mar 2004 11:30:00 -0000	[thread overview]
Message-ID: <405AAC97.60308@physik.tu-dresden.de> (raw)
In-Reply-To: <Pine.LNX.4.44.0403180818300.16213-100000@www.eyesopen.com>

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?

The current behavior is very surprising, at least to me. Excess precision is 
documented and known by most people doing numerical applications. On the other 
hand, a performance impact for the sake of correct rounding is surprising and 
very annoying here, especially since one cannot turn it off. And please don't 
expect everyone to use a flag named unsafe-math-optimizations.

Thanks,
Thomas Kunert


  parent reply	other threads:[~2004-03-19  8:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-18 17:49 Roger Sayle
2004-03-18 18:40 ` Jan Hubicka
2004-03-18 19:18   ` Roger Sayle
2004-03-20 22:07     ` Jan Hubicka
2004-03-19 11:30 ` Thomas Kunert [this message]
2004-03-19 12:28   ` Jakub Jelinek
2004-03-21  2:04   ` Robert Dewar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=405AAC97.60308@physik.tu-dresden.de \
    --to=kunert@physik.tu-dresden.de \
    --cc=gcc@gcc.gnu.org \
    --cc=roger@eyesopen.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).