--- Comment #6 from ian at macky dot net 2010-09-16 17:44 ---
Subject: Re: Floating point comparison failure
Thanks everyone. I usually do fuzzy floating-point comparison, except in
certain special circumstances. I will switch to using double constants;
I'm trying for a code that is
--- Comment #5 from paolo dot carlini at oracle dot com 2010-09-16 17:15
---
Thanks Jakub.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45691
--- Comment #4 from jakub at gcc dot gnu dot org 2010-09-16 17:13 ---
i?86 is a FLT_EVAL_METHOD 2 target, so for strict C compliance all floating
operations and constants are supposed to be evaluated in the precision
of long double. The assignment of the constant to a double var or expl
--- Comment #3 from pinskia at gcc dot gnu dot org 2010-09-16 17:08 ---
*** This bug has been marked as a duplicate of 323 ***
*** This bug has been marked as a duplicate of 323 ***
--
pinskia at gcc dot gnu dot org changed:
What|Removed |Added
--- Comment #2 from paolo dot carlini at oracle dot com 2010-09-16 17:08
---
As an even more general rule, remember to always specify your target: in this
case, for example, I can't reproduce at all the behavior on x86_64 -m64, only
with -m32.
--
http://gcc.gnu.org/bugzilla/show_bu
--- Comment #1 from dominiq at lps dot ens dot fr 2010-09-16 17:02 ---
pr323?
As a general rule: never compare floating points for equality, use
abs(a-b)http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45691