Re: [R] precision in seq

From: Peter Dalgaard <>
Date: Tue, 05 Feb 2008 12:08:33 +0100

Barry Rowlingson wrote:
> Prof Brian Ripley wrote:
>> FAQ Q7.31 and ?"==" should enlighten you.
>> None of 0.05, 0.1 ... 0.9, 0.95 are exactly representable on a binary
>> computer.
> Doesn't the string "0.95" constitute an exact representation? And my
> computer is definitely binary. Although I suspect it is also bipolar.
Will you stop pulling Brian's l...., ah, well, then again, never mind...

"Representable as binary floating point numbers" is correct, never mind on which computer. (Binary computers can and do also do BCD arithmetic (binary coded decimal) for bookkeeping applications, specifically to avoid cumulating roundoff. At least some have harware support for it. Similarly, nothing is keeping a decimal computer from doing binary arithmetic.)

And actually, three of those numbers *are* representable in binary floating point. ;-)

> It's the lack of understanding of the underlying encoding of real
> numbers - or even the actual *existence* of the underlying encoding -
> that means the cry of 'FAQ Q7.31!' will long echo down the halls of R-help.

   O__  ---- Peter Dalgaard             Ă˜ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (                  FAX: (+45) 35327907

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 05 Feb 2008 - 11:13:37 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 05 Feb 2008 - 12:30:12 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive