x87 float truncation/accuracy (gcc vs. icc/msvc)
Jakub Jelinek
jakub@redhat.com
Fri Mar 19 12:28:00 GMT 2004
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
More information about the Gcc
mailing list