Strange g+ 3.1.1 double behavior
Michael Veksler
veksler@il.ibm.com
Tue Aug 6 03:35:00 GMT 2002
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)
More information about the Gcc
mailing list