[R] arithmetic and logical operators

Berend Hasselman bhh at xs4all.nl
Wed Jan 30 21:39:34 CET 2013


On 30-01-2013, at 21:32, Dave Mitchell <dmmtchll at gmail.com> wrote:

> Why, in R, does (0.1 + 0.05) > 0.15 evaluate to True?  What am I missing
> here?  How can I ensure this (ostensibly incorrect) behavior doesn't
> introduce bugs into my code?  Thanks for your time.
> 

R-FAQ 7.31: http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f

Berend



More information about the R-help mailing list