Profile icon
DuckMonkey

# Pi Calculator.css-1q3m8ps{margin-left:var(--space-4);margin-right:var(--space-4);display:none;}

So, I wanted to make a Pi calculator without imports. I figured I could just use circles, but I would have to use Pi to render the circles in Python without imports (to my knowledge)... So, in search of calculating Pi, I came upon the Leibniz formula. My script started out about 100 lines long but I got it down real small; however, though, this formula was very inefficient, and I ended up with the Nilakantha formula. It's really fast and generates a lot of digits. I'm kinda proud of it, so I hope you guys like it too. If anyone knows how I could make it faster or more accurate, I'm open to any suggestions!

You are viewing a single comment. View All
Profile icon
DuckMonkey

@DynamicSquid
Of course, thanks for the upvote :)