268 points · by georgehill · 3y ago · 133 comments
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.
In my very personal opinion, the overall publication history of the three provides some rather good evidence for Plouffe's claims.
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.
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?
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.
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}.
And this was by taking 4 terms of the zeta function infinite product expansion. 2xn digits would presumably be given by taking more terms (but quite a few, one for every prime under 100, so in some sense this method has bad convergence when you want the mth digit of pi^n and m >> n).
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?
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?
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).
[1] https://en.wikipedia.org/wiki/Bailey%E2%80%93Borwein%E2%80%9...
There are transcendental numbers where the n-th digit can be computed in O(log n) like Champerowne constant though.
cmeacham98's constant: a number where the `n`th digit is the `2^n`th 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 >>> 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' Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'manojlds' object has no attribute 'humour'. Did you mean: 'joke'?> 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?
Could someone who is a practicing mathematician speak to the practical application of this? From what I understand from reading this seems like an interesting curiosity but the Chudnovsky formula it refers to seems to be better at doing the same thing for any practical purpose.
https://www.johndcook.com/blog/2023/01/16/pi-bernoulli-numbe...
n => Math.PI.toString()[n+2]It's another way to help verify super long calculations of pi are correct, and in turn I guess one basic "practical application" of calculating pi to many digits is as part of the suite for verifying new hardware. How do you know that fancy fresh new silicon is actually crunching the numbers correctly, not producing garbage in some subtle way at enough significant digits? While there are lots and lots of checks used to avoid a repeat of hardware bugs of days past (like the forever infamous Pentium FDIV), one simple sanity check/stress test is calculating out numbers like pi a bunch of different ways to huge numbers of digits and making sure the result is always correct. If it's not there's clearly a problem somewhere.
http://en.wikipedia.org/wiki/Normal_number
This is particularly exciting because the prevailing opinion had been that we lack the mathematical tools to attack that problem.
Basically the work will be give me starting index from which, next N digits are = "45334138023580". Finding the first digit can take ages while verification is O(1)ish.
Imagine that to provide storage systems similar to IPFS, but the blockchain network only stores the metadata and no data!
That is not the formula.
Looks to me like nfs is simply transforming a binary space index into a pi-space index. Some files may compress to a smaller value than they are in binary space (if you get lucky), but make no mistake, some files will be much much larger (i.e. the files you're trying to store don't show up in pi until an index value that is a virtually infinite number of digits long).
Why is this thing so slow? It took me five minutes to store a 400 line text file!
Well, this is just an initial prototype, and don't worry, there's always Moore's law!
So I'm guessing they are quite aware of the joke, and props to them for the dedication to commit and write the code (or the other way around) :)
The library of babel could be a good "useless" backing though https://libraryofbabel.info/bookmark.cgi?hnexample
It takes the input, converts it into N, then calculates position using the N.
Thank you. I argued for a long time simply by being ignorant.
good bless ya sir.
We know exactly how much time we need to compute the nth digit of pi. But how much time do we need to find a specific string of digits? Seems like a more interesting question.
> What will the super computers going to do in view of this discovery?
Whatever they do now. It’s not like this is what supercomputers are built for. Computations like these more are used to get confidence that the hardware works.
Now, for the hype, I don’t see any from the authors.
No one's saying it is, this is arXiv, after all (not a journal). Still a fun little interesting paper, though.
const nDigitOfPi = (n) => (22/7).toString()[n+1]
For example, https://arxiv.org/help/jref says:
> When a article is published, the author may wish to indicate this in the abstract listing for the article. For this reason, the journal reference and DOI (Digital Object Identifier) fields are provided for articles.
This can only make sense if "public abstract on arxiv" is not the same as "published" in the way you mean.
and you shouldn't. As long as it is somewhat legible, forcing people who are not native English speakers to conform to another language 100 % in order for their science to be published is horrendous.
There was a time 300 years ago, where great thinkers who did not speak French or German could not publish their thoughts and answers, and to us now it seems atrocius. Let us not go a head and redo that with English
Edit: A possible solution would be to have "good idea, please language edit and send back for further review" as an option along with "reject" / "needs major revisions" / "needs minor revisions" / "accept".
If you say so - but honestly, why not just publish it in French then (I think the author is French)? If I were publishing something in French - technical or scientific or otherwise - I’d want it to be reviewed by a native speaker.