0
Write your code to calculate pi as accurate as you can
Write a mathematical formula you use then attach a code which executes your formula.
4 Respuestas
+ 1
You would need a library which can handle the massive amount of digits this formula produces to really use the algorithm ^^
https://code.sololearn.com/cJ0s82a3cb2B/?ref=app
+ 3
https://code.sololearn.com/cUGHRx5t8csQ/?ref=app
or
http://users.telenet.be/koen.beek/pages/formules.htm
+ 2
More accurate (5 digits after floating point), and quickest:
https://code.sololearn.com/cGkU7PO5ozF4/?ref=app
0
in javascript
document.write(Math.PI);