leibniz-series
v2.0.0
Published
Estimate pi with the Leibniz series
Downloads
12
Readme
leibniz-series
Estimate pi with the Leibniz series.
Example
const leibnizSeries = require('leibniz-series');
leibnizSeries(100);
// => 3.1514934010709914 (meh, close enough)
leibnizSeries(200);
// => 3.1465677471829556 (a little better!)
Installation
$ npm install leibniz-series
API
const leibnizSeries = require('leibniz-series');
leibnizSeries(n)
Estimate pi using the Leibniz series up to Number n
.