Readit News logoReadit News
_ache_ · 3 years ago
Plouffe ...

He used to teach in my university. He is a fantastic man. This is serious, he is crazy about numbers. He is one of the guy behind OEIS (oeis.org).

That is not the first formula he found about pi and some of the previous one had been used to break world record about the number of known decimals.

exmadscientist · 3 years ago
Probably this is a good time for your irregular reminder that Plouffe has something of a feud with Bailey and Borwein: https://groups.google.com/g/sci.math.symbolic/c/a3kVKVYJhgc?...

In my very personal opinion, the overall publication history of the three provides some rather good evidence for Plouffe's claims.

_ache_ · 3 years ago
Oh thank you for the link !

In fact, I wasn't sure about the full story but the fact that Wikipedia repeatedly told that Plouffe alone discover the formula makes me think that there is a story behind that.

_ache_ · 3 years ago
Ok, so the method is real but will not be used to break the next world record. Chudnovsky algorithm is better at that task.
lifthrasiir · 3 years ago
Not this one, but algorithms that can calculate the specific digit positions but nothing else are indeed used for world records, mainly for the verification. If two radically different algorithms converge into the same digits at something like the trillionth position then you will have a high confidence for the rest of digits.
colanderman · 3 years ago
See also Plouffe's earlier (1995) formula to extract hexadecimal digits of pi: https://en.m.wikipedia.org/wiki/Bailey%E2%80%93Borwein%E2%80...
userbinator · 3 years ago
...which Fabrice Bellard improved upon: https://en.m.wikipedia.org/wiki/Bellard%27s_formula
karmakaze · 3 years ago
We should also have decimal/binary/hex digits of Tau to complete the set.
cleak · 3 years ago
Decimal is the only tricky one. Given that tau=2pi, simple use f(n-1) in the original binary formula for pi, and I’m sure something just as trivial for hex.
telotortium · 3 years ago
𝜋 in the title is a character I haven't seen before, [Mathematical Italic Small Pi](https://unicode-table.com/en/1D70B/).
Sharlin · 3 years ago
Yes, and there's also bold (𝛑), bold italic (𝝅), sans-serif bold (𝝿), and sans-serif bold italic (𝞹), all distinct from the run-of-the-mill Greek Small Letter Pi (π) which is often rendered quite differently from the "standard mathematical pi" in addition to, of course, being semantically different. There's a lot of fun stuff in the Mathematical Alphanumeric Symbols block (https://unicode-table.com/en/blocks/mathematical-alphanumeri...)
tzs · 3 years ago
In "n’th digit of 𝜋 and 𝜋^n" are both n the same?

In other words, for say 𝜋^50 does the formula only give me the 50th digit, or does it give me any arbitrary digit I want?

coherentpony · 3 years ago
> In "n’th digit of 𝜋 and 𝜋^n" are both n the same?

Yes.

> In other words, for say 𝜋^50 does the formula only give me the 50th digit

Yes.

> or does it give me any arbitrary digit I want?

It gives you the n-th digit of \pi^n. Here n is arbitrary.

gnramires · 3 years ago
Mathematicians (and other math subjects) use an interesting notation that is something like a "semantically local variable". A symbol like n can be reused multiple times, as long as the context is clear you're allowed to do that.
dmurray · 3 years ago
The article title says "powers of 𝜋", so presumably an arbitrary digit.
mattkrause · 3 years ago
I’m not sure that’s right.

The abstract and text say the nth digit of \pi^n, and the worked example on page 2 uses the same n=1000 to find the thousandth digit of \pi^{1000}.

Deleted Comment

nico · 3 years ago
Is there a physical limit to how many digits of pi can ever be computed/represented in the universe?

For example, let’s say we need one atom for each digit of pi that we want to store, the max limit of digits of pi would be something like the total number of atoms in the universe, minus the atoms required to compute and store the digits.

Has that been studied/calculated?

thom · 3 years ago
This sounds like a lot of work, when the physical limit of how many decimal places you need in our universe given the Planck length is only 63 or so.
nico · 3 years ago
What do you mean that we “only need” 63 decimal places?

A computer can calculate and hold a lot more than 63 digits.

So I guess my question is more like: if the universe was just one big computer dedicated only to calculating (and storing) digits of pi, how many digits could it get to calculate, max?

sega_sai · 3 years ago
It is all curious, but it seems that procedure that calculates the n-th digit using some other functions that require O(n) calculations (i.e. Bernoulli numbers) is not that exciting, as it's just a speedup comparing to a naive calculation (maybe a big one but still).

Although because pi is a transcendental number maybe it is impossible to have an algorithm to return the n-th digit in O(1) operations? Does anyone know ?

Upd: thinking more about it, just to read all the digits of number n, one needs log(n) operations, so I guess anything that has performance of O(log(n)) can be considered easy (i.e. the digits of rational numbers can be computed in O(logn).

tooltower · 3 years ago
The normal method for computing digits of pi is not O(n), so this could still be interesting. I think it's probably better to compare this with the BBP formula [1]. The commonly used algorithm for pi I think still takes O(n log^3 n) time [2]

[1] https://en.wikipedia.org/wiki/Bailey%E2%80%93Borwein%E2%80%9...

[2] https://en.wikipedia.org/wiki/Chudnovsky_algorithm

kdkdk · 3 years ago
Even rational numbers which have repeating digits at the end are not O(1) because in order to calculate the n-th digit you need to calculate n modulo k where k is the length until the number repeats its digits, which needs to read the entire input number n (thus runs in O(log(n)). The only exception are rational numbers with k being a power of two. Take 0.1010101010…, you can get the n-th digit by reading off the smallest digit of n and checking whether it is a 0 or a 1.

There are transcendental numbers where the n-th digit can be computed in O(log n) like Champerowne constant though.

ur-whale · 3 years ago
The interesting question is: are there real numbers whose N-th digit provably cant be calculated in O(N)?
yongjik · 3 years ago
Even better: there are (well defined) real numbers whose N-th digit provably cannot be computed at all.

https://en.wikipedia.org/wiki/Chaitin%27s_constant

cmeacham98 · 3 years ago
I don't know of any with practical use, but you can fairly easily define a contrived one:

cmeacham98's constant: a number where the `n`th digit is the `2^n`th digit of pi

paulpauper · 3 years ago
exactly. this paper is trivial, sorry to say.
childintime · 3 years ago
Chatgpt, please write a function in python for the nth digit of pi.

    Sure, here is a function in Python that calculates the nth digit of Pi using the Chudnovsky algorithm:

    from decimal import *

    def nth_digit_of_pi(n):
        getcontext().prec = n + 1
        C = 426880 * math.sqrt(10005)
        M = 1
        L = 13591409
        X = 1
        K = 6
        S = L
        for i in range(1, n):
            M = (K ** 3 - 16 * K) * M // i ** 3 
            L += 545140134
            X *= -262537412640768000
            S += Decimal(M * L) / X
            K += 12
        return +str(S / C)[n]

Seems off, but I learned something: https://www.wikiwand.com/en/Chudnovsky_algorithm

robinhouston · 3 years ago
Interesting! If you correct the obvious errors, then it appears to calculate 1/pi:

    >>> from decimal import Decimal
    >>> import math
    >>> 
    >>> def nth_digit_of_pi(n):
    ...     getcontext().prec = n + 1
    ...     C = Decimal(426880 * math.sqrt(10005))
    ...     M = 1
    ...     L = 13591409
    ...     X = 1
    ...     K = 6
    ...     S = L
    ...     for i in range(1, n):
    ...         M = (K ** 3 - 16 * K) * M // i ** 3 
    ...         L += 545140134
    ...         X *= -262537412640768000
    ...         S += Decimal(M * L) / X
    ...         K += 12
    ...     return str(S / C)[n]
    ... 
    >>> "".join([ nth_digit_of_pi(i) for i in range(50) ])
    '0.318309886183790698041462054251035408427213165074'

leoff · 3 years ago
since this is Python, `nth_digit_of_pi(-1)` should give us the last number of Pi.
manojlds · 3 years ago
But it's not a list
mjd · 3 years ago
Genius.
_visgean · 3 years ago
Here is an article with an actual implementation https://www.craig-wood.com/nick/articles/pi-chudnovsky/
p-e-w · 3 years ago
I don't understand this claim on the bottom of page 1 (emphasis added):

> It is easy to verify that with n = 1000, the error on π is of the order of 0.293193 x 10^-303, which is less than 2^-1000. So the thousandth position of this expression is the 1000th bit of the number π.

How does that follow? Take the number 1 - 2^-n. The difference between this number and 1 is 2^-n by definition, so it can be made arbitrarily small by varying n, but all bits are wrong. Addition can propagate all the way to the "decimal" point (and even beyond), so an error bound doesn't normally say anything about individual bits or digits. What am I missing here?