MathGroup Archive 2002

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

Search the Archive

RE: RE: Re: Could someone verify a long Pi calculation in Version 4 for me?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg36840] RE: [mg36821] RE: [mg36806] Re: Could someone verify a long Pi calculation in Version 4 for me?
  • From: "DrBob" <drbob at bigfoot.com>
  • Date: Sat, 28 Sep 2002 04:34:45 -0400 (EDT)
  • Reply-to: <drbob at bigfoot.com>
  • Sender: owner-wri-mathgroup at wolfram.com

>>I believe the complexity is O(n log n), so this should be good enough.

Umm ..."good enough"?  I understand the words individually, but the
phrase makes no sense to me.

Bobby Treat

-----Original Message-----
From: dterr at wolfram.com [mailto:dterr at wolfram.com] 
To: mathgroup at smc.vnet.net
Subject: [mg36840] Re: [mg36821] RE: [mg36806] Re: Could someone verify a long Pi
calculation in Version 4 for me?

DrBob wrote:

> >>So would it take about the same amont of time for the complete
> printout
> of digits? Of course it would take a few additional seconds to format
> the output...
>
> I think it would take FAR more time for a complete printout, and might
> crash the Front End.  I was thinking about the fact that I calculated
> all those digits and then threw them away.  I could save them with
Save
> or DumpSave, and read them in with Get the next time I wanted any of
> them, although the file would be close to 70 MB (if not more).  I may
do
> that, in fact -- I have plenty of disk space.
>
> The next step would be to somehow reuse the stored digits if I wanted
> MORE digits.  But how?
>
> The Bailey-Borwein-Plouffe Pi algorithm is an avenue of attack, since
it
> can calculate digits far from the decimal point, without calculating
> those in between.  Unfortunately, it calculates hexadecimal digits in
> that way, not decimal digits.  (That's true for the version I've seen,
> anyway.)  Still, I could take the stored digits, convert to
hexadecimal,
> add more hexadecimal digits with the B-B-P algorithm, and then convert
> back to decimal.  In both conversions, I'd have to be very cognizant
of
> how much precision I end up with, but that shouldn't be too difficult.
> It might go faster if I store hexadecimal digits, as well as decimal
> digits, to eliminate one of those conversions at each increase in the
> number of digits.
>
> The next step would be to set up an application that allowed anyone to
> ping for digits across the Internet, and would return them if they're
> stored.
>
> Hasn't someone already done that?  It seems as if someone would have.
>
> Bobby Treat

If you're interested in decimal digits, I don't think the BBP algorithm
is the
way to go. In order to get the nth decimal digit of Pi you need to
compute the
previous n-1 digits, since base conversion is global, not local. The
algorithm
Mathematica uses for computing Pi is quite fast - I believe the
complexity is O(n
log n), so this should be good enough.

David

>
>
> -----Original Message-----
> From: zeno [mailto:zeno1234 at mindspring.com]
To: mathgroup at smc.vnet.net
> Subject: [mg36840] [mg36821] [mg36806] Re: Could someone verify a long Pi
calculation in
> Version 4 for me?
>
> So would it take about the same amont of time for the complete
printout
> of digits? Of course it would take a few additional seconds to format
> the output...
>
> Or does Mathematica take alot less time when it truncates the output?
>
> In article <amris4$576$1 at smc.vnet.net>, Tom Burton
<tburton at brahea.com>
> wrote:
>
> > Hello,
> >
> > On 9/23/02 12:19 AM, in article ammfi5$lk7$1 at smc.vnet.net, "zeno"
> > <zeno1234 at mindspring.com> wrote:
> >
> > > Could you tell me the CPU you used and its speed etc...i am
curious,
> > > thanks. It would be interesting to compare Version 4s Pi
performance
> to
> > > other programs out there.
> >
> > I used one processor of a dual 1GH Mac and got the same answer with
> the
> > following speed:
> >
> > $Version
> > 4.2 for Mac OS X (June 4, 2002)
> > oldmax = $MaxPrecision
> >      6
> > 1. 10
> > $MaxPrecision = Infinity
> > Infinity
> > With[{n = 2^26}, Timing[
> >    pd = RealDigits[N[Pi, n + 1], 10, 20,
> >       19 - n]; ]]
> > {28794.1 Second, Null}
> > MaxMemoryUsed[]
> > 512055204
> > pd
> > {{3, 3, 8, 6, 3, 2, 2, 0, 8, 9, 6, 2, 2, 3,
> >
> >    4, 0, 9, 8, 0, 3}, -67108844}
> >
> > Tom Burton




  • Prev by Date: Re: Re: Simplifying inequalities
  • Next by Date: Re: Re: Simplifying inequalities
  • Previous by thread: Re: Re: Bug in Solve?
  • Next by thread: Need to evaluate functions of the form y=5e+5 x1+2e-1x2, etc., were e means 10^