Re: [R] Precision in R

From: Marc Schwartz <MSchwartz_at_medanalytics.com>
Date: Wed 21 Jul 2004 - 03:50:55 EST

On Tue, 2004-07-20 at 12:13, Duncan Murdoch wrote:
> On Tue, 20 Jul 2004 11:55:32 -0400, adelmaas@musc.edu wrote :
> >Does anyone know
> >where I can find specifications for R's type double?
>
> As far as I know, all platforms use the IEEE-754 standard double
> precision numbers. Google will give you a description; here's one:
>
> http://research.microsoft.com/~hollasch/cgindex/coding/ieeefloat.html
>
> This isn't relevant to your question, but I found the history of the
> development of the standard interesting:
>
> http://http.cs.berkeley.edu/~wkahan/ieee754status/754story.html
>
> Duncan Murdoch

Duncan,

The standard is there, but not all applications stick to it faithfully. A good example being how certain <cough> spreadsheets <\cough> deal with numbers "close to zero".

For example, Excel will round numbers "close to zero" to zero. You may recall this thread from last year covered this topic

http://maths.newcastle.edu.au/~rking/R/help/03a/6597.html

More information on Excel's varied compliance with the IEEE 754 standard is available here

http://support.microsoft.com/default.aspx?scid=kb;en-us;78113

The official IEEE 754 page is at http://grouper.ieee.org/groups/754/ and there are some good reading materials and FAQ's there.

This above is beyond the scope of SAS in particular, but I suspect that the difference that Aaron is experiencing, as Andy has noted, is methodologic and not precision related.

Aaron, one other source for information on the precision of R on your particular machine is the use of .Machine, which will provide you with a list of specifications. See ?.Machine for additional information here.

HTH, Marc Schwartz



R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Jul 21 03:57:26 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:55:07 EST