[R] Modular Arithmetic Error?
Dimitris Rizopoulos
d.rizopoulos at erasmusmc.nl
Fri Apr 17 16:36:22 CEST 2009
check the R FAQ, and in particular entry 7.31:
http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f
Best,
Dimitris
iuhz7j202 at sneakemail.com wrote:
> A few further oddities (no longer having to do with modular arithmetic):
>
>> (0.3 * 3) == 0.9
> [1] FALSE
>> (0.2 * 6) == 1.2
> [1] FALSE
>
> This is bad behavior, right? I feel like I'm going crazy.
>
> I'm using R version 2.8.1 (2008-12-22).
>
> Thanks,
> Peter
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Dimitris Rizopoulos
Assistant Professor
Department of Biostatistics
Erasmus University Medical Center
Address: PO Box 2040, 3000 CA Rotterdam, the Netherlands
Tel: +31/(0)10/7043478
Fax: +31/(0)10/7043014
More information about the R-help
mailing list