For more details about floating-point: http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
2013/1/5 peter dalgaard <pda...@gmail.com> > > On Jan 5, 2013, at 20:30 , Rolf Turner wrote: > > > On 01/06/2013 07:42 AM, David Arnold wrote: > >> Hi, > >> > >> Can someone explain this: > >> > >>> options(digits=20) > >>> 1/3 > >> [1] 0.33333333333333331483 > >> > >> Why the 1483 at the end? > > > > There are 10 sorts of people; those who understand binary > > arithmetic and those who don't. See also FAQ 7.31. > > Actually, it seems there are 11 sorts; those who understand binary, those > who understand floating point binary, and those who do neither. The first > 0.010101010101010101... of these would seem to the the issue here. > > (Or 1.0101010101...e-10 if you want to split hairs.) > > -- > Peter Dalgaard, Professor, > Center for Statistics, Copenhagen Business School > Solbjerg Plads 3, 2000 Frederiksberg, Denmark > Phone: (+45)38153501 > Email: pd....@cbs.dk Priv: pda...@gmail.com > > ______________________________________________ > R-help@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. > [[alternative HTML version deleted]] ______________________________________________ R-help@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.