Is there a way to calculate pi in Javascript? I know there you can use Math.PI
to find pie like this:
var pie = Math.PI;
alert(pie); // output "3.141592653589793"
but this is not accurate. What I want is to be able to calculate it, to have as many digits as you want, not anything like pie = 3.141592...
. But still, what I want is not have just have some more digits, but as much as you can (like having one thousand digits, but I need more).
I found this code on this website: