[R] floor() rounding problem?

Simon Woodhead simon.woodhead at bristol.ac.uk
Tue Aug 9 13:42:16 CEST 2005


Dear all,

Could someone please explain the following perculiarity?

 > 2 == 0.2/0.1
[1] TRUE
 > 3 == 0.3/0.1
[1] FALSE

Similarly,

floor(0.2/0.1) = 2
floor(0.3/0.1) = 2

Thank you,
Simon




More information about the R-help mailing list