Skip to content
Prev 12179 / 63424 Next

"==" gives incorrect answers! (PR#6691)

dongyunhkim@yahoo.com wrote:

            
Not a bug!

These are (expected!) numerical issues of the representation of those 
values. Please read help("==") which tells you:

"For numerical values, remember == and != do not allow for the finite 
representation of fractions, nor for rounding error. Using all.equal 
with identical is almost always preferable."

And ?all.equal and ?identical tell you to use:

  identical(all.equal(2.7 + 0.1, 2.8), TRUE)


Uwe Ligges