Open nooreendabbish opened 8 years ago
How many digits of pi do you get in your browser when you
var foo = 22/7;
console.log(foo);
???
Apparently Math.PI is the best representation that JavaScript can offer without some code to implement big numbers.
I get 15 digits in safari. While figuring that out, I realized there is also interest in memorizing the digit number associated with each digit/sequence. (Meaning I am personally interested in also memorizing that, but I'm certain others are too).
I mis read that question I get 3.1428... which has three correct digits.
I made a jsfiddle a year or two ago for finding efficient rational approximations. Press find to see a list of rational approximations of pi. https://jsfiddle.net/WilliamSharkey/o25yzoqs/
This is an idea from David Dobor (david-dobor). You enter a fraction approximating pi (ex: 22/7) and the digits of correct approximation are played. I suggest/will use truncation not rounding.