This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/45691] Floating point comparison failure



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]