TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

A formula for the nth digit of 𝜋 and 𝜋^n

268 点作者 georgehill超过 2 年前

24 条评论

_ache_超过 2 年前
Plouffe ...<p>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).<p>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.
评论 #34393127 未加载
评论 #34389786 未加载
colanderman超过 2 年前
See also Plouffe&#x27;s earlier (1995) formula to extract hexadecimal digits of pi: <a href="https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Bailey%E2%80%93Borwein%E2%80%93Plouffe_formula" rel="nofollow">https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Bailey%E2%80%93Borwein%E2%80...</a>
评论 #34393428 未加载
评论 #34393187 未加载
telotortium超过 2 年前
𝜋 in the title is a character I haven&#x27;t seen before, [Mathematical Italic Small Pi](<a href="https:&#x2F;&#x2F;unicode-table.com&#x2F;en&#x2F;1D70B&#x2F;" rel="nofollow">https:&#x2F;&#x2F;unicode-table.com&#x2F;en&#x2F;1D70B&#x2F;</a>).
评论 #34392305 未加载
tzs超过 2 年前
In &quot;n’th digit of 𝜋 and 𝜋^n&quot; are both n the same?<p>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?
评论 #34390955 未加载
评论 #34391428 未加载
评论 #34390269 未加载
nico超过 2 年前
Is there a physical limit to how many digits of pi can ever be computed&#x2F;represented in the universe?<p>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.<p>Has that been studied&#x2F;calculated?
评论 #34394783 未加载
sega_sai超过 2 年前
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&#x27;s just a speedup comparing to a naive calculation (maybe a big one but still).<p>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 ?<p>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).
评论 #34391766 未加载
评论 #34391852 未加载
评论 #34394020 未加载
评论 #34394371 未加载
childintime超过 2 年前
Chatgpt, please write a function in python for the nth digit of pi.<p><pre><code> 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 &#x2F;&#x2F; i ** 3 L += 545140134 X *= -262537412640768000 S += Decimal(M * L) &#x2F; X K += 12 return +str(S &#x2F; C)[n] </code></pre> Seems off, but I learned something: <a href="https:&#x2F;&#x2F;www.wikiwand.com&#x2F;en&#x2F;Chudnovsky_algorithm" rel="nofollow">https:&#x2F;&#x2F;www.wikiwand.com&#x2F;en&#x2F;Chudnovsky_algorithm</a>
评论 #34390340 未加载
评论 #34389953 未加载
评论 #34390074 未加载
p-e-w超过 2 年前
I don&#x27;t understand this claim on the bottom of page 1 (emphasis added):<p>&gt; 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. <i>So the thousandth position of this expression is the 1000th bit of the number π.</i><p>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 <i>all</i> bits are wrong. Addition can propagate all the way to the &quot;decimal&quot; point (and even beyond), so an error bound doesn&#x27;t normally say anything about individual bits or digits. What am I missing here?
CSMastermind超过 2 年前
Wanted to compliment this paper for being well written. I&#x27;m not a practicing mathematician but I was able to easily follow along here and that was a cool feeling.<p>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.
ars超过 2 年前
This is a type of <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Spigot_function" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Spigot_function</a> if you want to lookup more info.
johndcook超过 2 年前
The paper begins by citing an equation that isn&#x27;t explicitly in the book referenced. I wrote up some notes filling in a few missing details.<p><a href="https:&#x2F;&#x2F;www.johndcook.com&#x2F;blog&#x2F;2023&#x2F;01&#x2F;16&#x2F;pi-bernoulli-numbers&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.johndcook.com&#x2F;blog&#x2F;2023&#x2F;01&#x2F;16&#x2F;pi-bernoulli-numbe...</a>
lyschoening超过 2 年前
&gt; Note that the calculation of Bernoulli numbers can be done in several ways, one of which requires knowing π with good precision<p>This seems to be the catch.
评论 #34390441 未加载
评论 #34390419 未加载
detrites超过 2 年前
Has anyone converted the formula to code?
评论 #34390222 未加载
ashvardanian超过 2 年前
Looks interesting! Does anyone know a practical application where something like this would help?
评论 #34390683 未加载
评论 #34390517 未加载
scythe超过 2 年前
The interesting question, I think, is whether this formula can help address the question of the normality of pi:<p><a href="http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Normal_number" rel="nofollow">http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Normal_number</a><p>This is particularly exciting because the prevailing opinion had been that we lack the mathematical tools to attack that problem.
评论 #34390185 未加载
saddist0超过 2 年前
Something like this can be used for &quot;proof of work&quot; in the blockchain world.
评论 #34394493 未加载
Maursault超过 2 年前
But... pi is <i>in</i> the formula. If you already know it, then why bother?
评论 #34391990 未加载
评论 #34391626 未加载
评论 #34391841 未加载
评论 #34392049 未加载
tucnak超过 2 年前
So does it mean that these pi-calculating competitions &amp; record are now going to devolve to special olympiads in pointless storage capacity? What will the super computers going to do in view of this discovery? Fascinating times for humans as well as for the machines...
评论 #34389559 未加载
评论 #34389702 未加载
评论 #34389661 未加载
nyc111超过 2 年前
Are there measurements of pi calculated by meausuring diameter and circumference? How many digits can that pi have?
paulpauper超过 2 年前
There is nothing of note here. This paper should be in &#x27;general math&#x27;, not number theory. You need to know the Bernoulli numbers in order for this to work, which is more computationally difficult than computing pi. So what. Yeah, Plouffe is a famous person in computer science and math, but this does not measure up to the hype. It reminds me of the stuff i tinkered with in high school when i first learned infinite series ..but not publishable-level, sorry.
评论 #34394465 未加载
评论 #34394427 未加载
NeutralForest超过 2 年前
Finally, we can find the last digit of pi
评论 #34391408 未加载
评论 #34391851 未加载
评论 #34391582 未加载
评论 #34391821 未加载
评论 #34393835 未加载
评论 #34390134 未加载
antiquark超过 2 年前
Good ole Plouffe!
craigharley超过 2 年前
Here is another<p>const nDigitOfPi = (n) =&gt; (22&#x2F;7).toString()[n+1]
commandlinefan超过 2 年前
The paper seems absolutely brilliant, but the grammar is very strange (there’s even what appears to be a typo in the paper where he says “rand n” instead of “rank n”). Odd that he wouldn’t have worked with somebody with better written English before publishing.
评论 #34389883 未加载
评论 #34392181 未加载