[R] Unexpected result from binary greater than operator

Andy Bunn abunn at whrc.org
Tue Nov 1 17:34:40 CET 2005


Look at ?all.equal and ?identical as well as searching the archives for
those terms. You'll find many an illuminating thread on precision, floating
point arithmetic and other wonders.

minX <- 4.2
min0 <- 4.1
sigmaG <- 0.1
Diff <- minX-min0
all.equal(Diff, sigmaG)
identical(Diff, sigmaG)

HTH, Andy




More information about the R-help mailing list