Re: [R] What precision is R

From: Prof Brian Ripley <>
Date: Tue 06 Jul 2004 - 15:50:48 EST

On Mon, 5 Jul 2004, Laura Holt wrote:

> What precision is R, please? 64 bit?

Your question lacks precision :)

R uses the underlying double precision floating-point arithmetic of the OS it is running on. On all currrent platforms that we know of, that is IEC60566 arithmetic, with an (implicit) 53-bit mantissa.

So floating-point operations have double precision, usually with around 53 bits of accuracy.

> Where would I find that out typically, please?

Type ?.Machine, then print(.Machine).

One complication on machines with extended-precision registers (and since that includes the ix86 family, that is most of them) is that some calculations are done with a 64-bit mantissa and finally stored with a 53-bit mantissa. Those may turn out to be more accurate than your expect (which makes measuring accuracy difficult).

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list
PLEASE do read the posting guide!
Received on Tue Jul 06 15:59:40 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:54:43 EST