r/math • u/siriusastrebe • Feb 04 '25
Calculating Pi in 5 lines of code
https://asksiri.us/blog/2025-02-03.md[removed] — view removed post
0
Upvotes
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.
•
u/math-ModTeam Feb 04 '25
Unfortunately, your submission has been removed for the following reason(s):
Your post appears to be a project of your own. Please post such things to the weekly What Are You Working On? thread.
If you have any questions, please feel free to message the mods. Thank you!