[Bug c++/40186] floating point comparison is wrong ( !(a b) (b a) is true )

2009-05-18 Thread ich at az2000 dot de
--- Comment #4 from ich at az2000 dot de 2009-05-18 13:38 --- Created an attachment (id=17888) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17888action=view) simpler test case (now for wrong ordering case 1) I was able to reproduce the first case now (wrong ordering 1). I also

[Bug c++/40186] floating point comparison is wrong ( !(a b) (b a) is true )

2009-05-18 Thread pinskia at gcc dot gnu dot org
--- Comment #5 from pinskia at gcc dot gnu dot org 2009-05-18 14:11 --- *** This bug has been marked as a duplicate of 323 *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added

[Bug c++/40186] floating point comparison is wrong ( !(a b) (b a) is true )

2009-05-18 Thread pinskia at gcc dot gnu dot org
--- Comment #6 from pinskia at gcc dot gnu dot org 2009-05-18 14:49 --- Either use -ffloat-store or -mfpmath=sse . The issue comes from excessive precision. It is not or which is causing the problem but keeping one of a or b in the fp stack register but putting the other one on the

[Bug c++/40186] floating point comparison is wrong ( !(a b) (b a) is true )

2009-05-18 Thread sliwa at cft dot edu dot pl
--- Comment #7 from sliwa at cft dot edu dot pl 2009-05-18 14:52 --- The case (a b) (b a) shows that not discarding the extra precision before performing a comparison leads to serious problems. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40186

[Bug c++/40186] floating point comparison is wrong ( !(a b) (b a) is true )

2009-05-18 Thread vincent at vinc17 dot org
--- Comment #8 from vincent at vinc17 dot org 2009-05-18 14:56 --- Are you sure that this comes from the extended precision? This would mean that GCC does implicit extended - double conversions in an asymmetric way, and IIRC, I've never seen that. I can't reproduce the problem with