2.0.0 • Published 8 months ago
wallis-product v2.0.0
wallis-product
Estimate pi with the Wallis product.
Example
const wallis = require('wallis-product');
wallis(10);
// => 3.0677038066434976
wallis(10000000);
// => 3.141592575082479
Installation
$ npm install wallis-product
API
const wallis = require('wallis-product');
wallis(n)
Returns an approximation of pi using the Wallis infinite product up to a term of
Number n
.