MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Pi upto a Billion Digits

  • To: mathgroup at smc.vnet.net
  • Subject: [mg75693] Re: Pi upto a Billion Digits
  • From: dimitris <dimmechan at yahoo.com>
  • Date: Wed, 9 May 2007 04:15:58 -0400 (EDT)
  • References: <f1msfm$rnf$1@smc.vnet.net>

I must admit what you asked is not "my cup of tea".
So I may miss some things.
But...
I don't believe that this is a task for the N function.

In[23]:=
Developer`ClearCache[]

In[24]:=
InputForm[(Timing[N[Pi, 10^#1]; ] & ) /@ Range[7]]

Out[24]//InputForm=
{{0.*Second, Null}, {0.*Second, Null}, {0.*Second, Null},
{0.015999999999999986*Second, Null},
 {0.5619999999999999*Second, Null}, {13.453*Second, Null},
{267.17199999999997*Second, Null}}

Look the differences in timings!

Is it an important reason you want Pi with so many decimal digits?
Or you just want to testify Mathematica?

There are many references containg formulas about Pi that you should
consult instead of N[Pi,..] (or evalf(Pi,...) on another CAS) for
obtaining numerical approximations of Pi with millions of digits.

(BTW Pi is computed using the Chudnovsky formula in Mathematica
which as far as I have read they must be (the brothers!) considered
gurus of Pi

http://mathforum.org/library/drmath/view/58285.html

www.mathsci.appstate.edu/~sjg/class/3010/final/andy.pdf )

1) L. Berggren, J. Borwein, P. Borwein. Pi: A Source Book, Springer-
Verlag, New York, 1997.
2) J. Arndt, C. Haenel. =F0 Unleashed, Springer-Verlag, Berlin, 2001.

3) http://mathworld.wolfram.com/PiFormulas.html

I think that the old book Mathematica in Action contain some material
about Pi.

Copy/Paste also the following command on a notebook and then execute
it.

In[28]:=
FrontEndExecute[{HelpBrowserLookup["Demos", "Pi"]}]

(or see here
http://documents.wolfram.com/mathematica/Demos/Notebooks/CalculatingPi.html
)

The following may be interested for you.

Suppose you want to compute the thousandth digit in base 10

In Mathematica 5.2 you could have

In[21]:=
Block[{$MaxExtraPrecision = 10000}, First[RealDigits[Pi, 10, 1,
-1000]]]

Out[21]=
{9}

Indeed

In[52]:=
N[Pi,1001]

Out[52]=
3=2E14159265358979323846264338327950288419716939937510582097494459230781640=
62862\
089986280348253421170679821480865132823066470938446095505822317253594081284=
811\
174502841027019385211055596446229489549303819644288109756659334461284756482=
337\
867831652712019091456485669234603486104543266482133936072602491412737245870=
066\
063155881748815209209628292540917153643678925903600113305305488204665213841=
469\
519415116094330572703657595919530921861173819326117931051185480744623799627=
495\
673518857527248912279381830119491298336733624406566430860213949463952247371=
907\
021798609437027705392171762931767523846748184676694051320005681271452635608=
277\
857713427577896091736371787214684409012249534301465495853710507922796892589=
235\
420199561121290219608640344181598136297747713099605187072113499999983729780=
499\
510597317328160963185950244594553469083026425223082533446850352619311881710=
100\
031378387528865875332083814206171776691473035982534904287554687311595628638=
823\
537875937519577818577805321712268066130019278766111959092164201989

Last but not least!

Did you see the film Pi?
Amazing movie!

Dimitris


=CF/=C7 Raj =DD=E3=F1=E1=F8=E5:
> hi!
>
> Could somebody tell me if they ever tried finding Pi upto a billion
> digits using the N function:
> N[Pi,10^9] and how long did it take?
>
> Thanks,
>
> Raj



  • Prev by Date: Re: Using FindFit with constraints ??
  • Next by Date: Re: mathematica 6.0 and geometrica
  • Previous by thread: Re: Re: Pi upto a Billion Digits
  • Next by thread: Re: Re: Pi upto a Billion Digits