+ 4
How can I program a code to aproximate to the number pi?
4 Antworten
0
In my example code I have shown how Madhava's algorithm is extremely precise and performing.
For example, with 20 computation cycles, the Leibniz (Euler) algorithm can not achieve a single byte precision, while Madhava can even reach a depth of 10 bytes!
Please see my code and comment if you wish..
https://code.sololearn.com/cDFUjarCHTlc/#py
+ 7
This gives a few different formulas for pi.
http://www.mathscareers.org.uk/article/calculating-pi/
+ 4
This one makes some crazy fast pi:
https://code.sololearn.com/c1UGxtX0G8h2/?ref=app
This one just feels crazy, using large random coprimes (+ youtube companion video):
https://code.sololearn.com/c6WmHJ82s1Y2/?ref=app
0
Here is my Code. Also take a look at Challenge Pi-day:
https://code.sololearn.com/cZIoUe1hbvI0/?ref=app
https://www.sololearn.com/learn/6136/?ref=app