π Approximations in C
AmazingMech2418 (1016)

So, you might have already seen @StudentFires 's attempt at a fast and accurate π approximation in C++...

So, here are two actually fast and accurate π approximations in C:

The repl linked to this post is the most accurate and is found at https://repl.it/@AmazingMech2418/p-in-C and the other is https://repl.it/@AmazingMech2418/p-in-C-2.

The first one uses trapezoidal sums while the other uses the Nilakantha Series.

Update: The second one was updated to make it faster. It gets to 16 places very quickly.

You are viewing a single comment. View All
AmazingMech2418 (1016)

@Jakman You still did pretty well. Maybe, next time, try C. :)