[R] Value of 'pi'

Peter Langfelder peter.langfelder at gmail.com
Mon May 30 09:06:57 CEST 2011


On Sun, May 29, 2011 at 11:53 PM,  <Bill.Venables at csiro.au> wrote:
> There is an urban legend that says Indiana passed a law implying pi = 3.
>
> (Because it says so in the bible...)
>

Apparently the Fortran language has a DATA statement just for this
purpose. This is allegedly a quote from an early Fortran manual:

The primary purpose of the DATA statement is to give names to
constants; instead of referring to pi as 3.141592653589793 at every
appearance, the variable PI can be given that value with a DATA
statement and used instead of the longer form of the constant. This
also simplifies modifying the program, should the value of pi change.

Peter



More information about the R-help mailing list