From: Anthony Landrevie <antho_l_at_yahoo.com>

Date: Wed 23 Mar 2005 - 20:03:21 EST

299.85239999999993

-5.68434188608080e-14

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Mar 23 20:09:16 2005

Date: Wed 23 Mar 2005 - 20:03:21 EST

Hello,

I am trying to test the precision of R on datasets from The Statistical Reference Datasets Project http://www.itl.nist.gov/div898/strd/index.html and I don't manage to understand how R is storing its results.

For example, I calculate a mean on the michelso dataset (100 values) and find:

> m=mean(michel)

*> m
*

V1

299.8524

> print(m,digits=15)

V1

299.8524

> print(m,digits=22)

V1

299.85239999999993

The certified value of the mean is 299.85240, so I try

V1

-5.68434188608080e-14

Does it have a sens to print with more than 15 signifiant digits? Why is the difference not equal to zero?

I am using R 2.0.1 under Windows XP.

[[alternative HTML version deleted]]

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Mar 23 20:09:16 2005

*
This archive was generated by hypermail 2.1.8
: Fri 03 Mar 2006 - 03:30:55 EST
*