π 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
Jakman (473)

If you need help with more C documentation I found free C book by the 2 creators of the language on this link 'http://www2.cs.uregina.ca/~hilder/cs833/Other%20Reference%20Materials/The%20C%20Programming%20Language.pdf'
I dont know if it is pirated so you dont know this from me ok.