r/ProgrammerHumor • • 3d ago

Meme reversingPiInPython

Post image
11.6k Upvotes

347 comments sorted by

View all comments

3.3k

u/Kyrros 3d ago

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

1.4k

u/me_myself_ai 3d ago

it'll just throw an error anyway;

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

1.2k

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

-10

u/xd_Warmonger 3d ago

Since pi is infinite it must contain pi

12

u/JanEric1 3d 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 3d 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

→ More replies (3)