[Rd] pi returns 0.7 (PR#1320)

ripley@stats.ox.ac.uk ripley@stats.ox.ac.uk
Thu, 21 Feb 2002 21:55:08 +0100 (MET)

What is `MS2000'?  bug.report() cannot possibly generate that under
Windows, so I presume this is some sort of Windows clone.

You know, people do spend a lot of time carefully checking ports of R
against known results.  Did you really believe that the official R port
for Windows produced pi = 0.7 on an uncorrupted operating system?

Three possibilities occur to me:

1) You have defined an object called pi somewhere in your search path.

2) The base R code has been corrupted (it contains pi <- 4*atan(1), BTW)

3) Your OS has corrupted components and so is computing atan incorrectly.

Try 4*atan(1).  If that is incorrect, re-install your OS. If it is
correct, try re-installing R (which in any case you want to do as 1.4.1 is

On Thu, 21 Feb 2002 jblewis@ucla.edu wrote:

> Full_Name: Jeffrey B. Lewis
> Version: 1.4.0
> OS: MS2000 5.00.2195
> Submission from: (NULL) (
> Here is an example,

An example of what?

> > pi;
> [1] 0.7
> >
> On my home machine running (I think) the same build of R but on WIN98
> returns that 3.141... The basic trigometric functions return their > correct values. So it seems to be a problem in the definition of
> this constant.

Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch