Full_Name: Attila Lengyel Version: 2.8.0 OS: WinXP Submission from: (NULL) (81.182.224.160)
-0.3+0.1+0.1+0.1
[1] 2.775558e-17
5 messages · Attila Lengyel, Gábor Csárdi, Brian Ripley +2 more
Full_Name: Attila Lengyel Version: 2.8.0 OS: WinXP Submission from: (NULL) (81.182.224.160)
-0.3+0.1+0.1+0.1
[1] 2.775558e-17
Hmmm, the favorite. http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f G.
Full_Name: Attila Lengyel Version: 2.8.0 OS: WinXP Submission from: (NULL) (81.182.224.160)
-0.3+0.1+0.1+0.1
[1] 2.775558e-17
______________________________________________ R-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Gabor Csardi <Gabor.Csardi at unil.ch> UNIL DGM
FAQ 7.31
Full_Name: Attila Lengyel Version: 2.8.0 OS: WinXP Submission from: (NULL) (81.182.224.160)
-0.3+0.1+0.1+0.1
[1] 2.775558e-17
______________________________________________ R-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Full_Name: Attila Lengyel Version: 2.8.0 OS: WinXP Submission from: (NULL) (81.182.224.160)
-0.3+0.1+0.1+0.1
[1] 2.775558e-17
This is not a bug, it's FAQ 7.31. Duncan Murdoch
hmm, an interesting quote:
"
To quote from ?The Elements of Programming Style? by Kernighan and Plauger:
/10.0 times 0.1 is hardly ever 1.0/.
"
so here's one example where 10.0 times 0.1 *is* 1.0:
perl -Mbignum -le 'print (10.0 * 0.1 == 1.0)'
# 1, for true
not an isolated idiosyncrazy, for that matter.
vQ