This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/45691] Floating point comparison failure
- From: "dominiq at lps dot ens dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Sep 2010 17:02:55 -0000
- Subject: [Bug c/45691] Floating point comparison failure
- References: <bug-45691-19700@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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)<epsilon.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45691