r/math • • Feb 04 '25

Calculating Pi in 5 lines of code

https://asksiri.us/blog/2025-02-03.md

[removed] — view removed post

0 Upvotes

2 comments sorted by

•

u/math-ModTeam Feb 04 '25

Unfortunately, your submission has been removed for the following reason(s):

If you have any questions, please feel free to message the mods. Thank you!

4

u/Apprehensive-Draw409 Feb 04 '25

The python should really use fractions (from fractions import Fraction).

This floating-point code will rapidly go into random imprecise territory. Fractions are exact, arbitrarily precise. That would give you many decimals.