[R] floor() rounding problem?

From: Simon Woodhead <simon.woodhead_at_bristol.ac.uk>
Date: Tue 09 Aug 2005 - 21:42:16 EST


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



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Aug 09 21:46:08 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:39:45 EST