Hacker News new | ask | show | jobs
by Scarblac 1454 days ago
Various algorithms to compute the n-th digit of pi exist, eg https://bellard.org/pi/pi_n2/pi_n2.html.
1 comments

I can't really tell to what extent you're not computing previous digits (or doing work that could quickly be used to come up with these previous digits) with this algorithm but O(n^2) seems quite heavy compared to O(1) (I expect) to get the n'th digit of op's number.

Maybe I should rephrase it:

My assumption is: If there is an O(1) algorithm to determine the n-th digit of an irrational number x then the number is still "of a different class" than the likes of pi and there OP might not be able to induce things from this "lesser class of irrational numbers"

However, it's just an intuition

How could it possibly be O(1)? That doesn't even give you time to read every bit of the input number.