Re: [R] floor() rounding problem?

From: Uwe Ligges <ligges_at_statistik.uni-dortmund.de>
Date: Tue 09 Aug 2005 - 21:51:00 EST

Simon Woodhead wrote:

> Dear all,
>
> Could someone please explain the following perculiarity?

Please read the FAQ "Why doesn't R think these numbers are equal" (as the posting gude asks you to do).

Uwe Ligges

> > 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



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:58:07 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 15:11:28 EST