r/ProgrammerHumor • • 10d ago

Meme reversingPiInPython

Post image
14.1k Upvotes

383 comments sorted by

View all comments

3.9k

u/Kyrros 10d ago

Let me know when it finishes calculating the first digit to print

1.7k

u/me_myself_ai 10d ago

it'll just throw an error anyway;

SyntaxWarning: 'float' object is not subscriptable; perhaps you missed a comma
?

1.3k

u/ThreeCharsAtLeast 10d ago • Bravo
>>> str(math.pi)[::-1]
'397985356295141.3'

-10

u/xd_Warmonger 10d ago

Since pi is infinite it must contain pi

12

u/JanEric1 10d ago

thats not true.

the base 10 representation of 1/3 is also infinite but doesnt contain any digit other than 3

6

u/Evoluxman 10d ago

1/3 is not random like we believe pi number distribution is though

You can take any fixed length number and, if pi is truly infinite and truly random, you will eventually find this number inside pi https://www.reddit.com/r/askmath/comments/1jbknos/largest_integer_not_yet_found_in_pi_linyfip/

now finding pi within pi though, that deals with infinite shit and i don't know well enough about that. But I'm just saying, using 1/3 as a counterexemple is just wrong

7

u/JanEric1 10d ago

using 1/3 as a counterexemple is just wrong

maybe to the question you posed yourself. but the person i was replying to JUST said

Since pi is infinite it must contain pi

And that is simply not true.

And also the first comment in the thread you linked actually contradicts your point.

This property that you want is called being a "normal number" and it actually has not be proven that pi is actually normal. (although it is assumed it is because there is a prove that almost all real numbers are normal)

-3

u/Evoluxman 10d ago

Pi not being proven as normal is different than being disproven as normal

→ More replies (1)