This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Strange g+ 3.1.1 double behavior
- From: Michael Veksler <veksler at il dot ibm dot com>
- To: Gunther Weber <weber at informatik dot uni-kl dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 06 Aug 2002 13:39:35 +0300
- Subject: Re: Strange g+ 3.1.1 double behavior
- Reply-to: veksler at il dot ibm dot com
References: <3D4E8656.6030402@informatik.uni-kl.de> <3D4E889D.243FAFCB@acm.org>
Gunther Weber wrote:
Thank you for your answer. That explains how this problem occurs.
-float-store (-mfloat-store does not exist) does not help, but
|-mno-fp-ret-in-387 helps. Anyway, I will not use these options. Insted
I will get rid of my misconception that identical floating point
calculations yield identical results and |write my programs accordingly.
So thank you for explaining this to me as it may help to prevent future
grief that would have resulted from holding on to my misconception :-)
I think you were correct to assume that FP calculations should yield
identical results. This is true at least according to IEEE standard.
Some time ago I had a similar complaint:
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6914
At the end of this page you can find a solution to your problem.
Also, it contains an explanation why I think current behavior is wrong
(the gcc/glibc combination does something wrong thing with FP arithmetic)