Share your repls and programming experiences

← Back to all posts
Pi Calculator(n digits)
bgrubert (189)

Try out this code and calculate from anywhere between 100, and 1 million digits of pi.

I've calculated up to 100,000 digits, but past that it's basically an infinite loop.

Uses JavaScript BigInt and a simple formula that can calculate thousands, and even millions of digits of pi!

I haven't fully figured out how to calculate digits smaller than 100 so please suggest in the comments if you have an idea.

Have fun and Happy Pi day!

Highwayman (1441)

Look them up, put them in a buffer, and then pretend you calculated them 😜