Nth digit of PI
Rajarshi Ray
rajarshi at home.com
Mon Jun 5 15:55:08 EDT 2000
Besides the gee-whiz aspect of such algorithms, do they have any value?
After all, what makes pi pi is ALL of its digits in a particular
sequence.
Kirby Urner wrote:
>
> Here's another "math through programming" challenge:
>
> Recent number theory breakthrough: you can get the
> nth digit of PI without doing all the work needed
> to compute all the digits up to the nth digit (same
> with some other numbers -- not sure if we know all
> the relevant criteria as to which).
>
> The original algorithm worked for PI expressed as
> a hexadecimal number, but I found a web page purporting
> to give the algorithm for a base 10 PI, but I couldn't
> figure out how to make it work in Python.[1][2]
>
> Anyone?
>
> Another question: does the algorithm for getting
> the nth digit of PI actually do less work (in terms
> of flipflops) than would an algorithm that gets
> all digits up to n inclusive? I assume so, as I
> read about someone getting a trillionth digit or
> something -- but I don't think we've got PI to that
> many places.
>
> Kirby
>
> [1] http://www.mathsoft.com/asolve/plouffe/plouffe.html
> [2] http://www.lacim.uqam.ca/plouffe/Simon/articlepi.html
--
Sir, I have found you an argument. I am not obliged to find you
an understanding.
- Samuel Johnson
More information about the Python-list
mailing list