2.0.0 • Published 8 months ago

wallis-product v2.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 months ago

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.

2.0.0

8 months ago

1.0.0

10 years ago