Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kaue/bbp-formula
🔢 Bailey-Borwein-Plouffe formula
https://github.com/kaue/bbp-formula
Last synced: about 2 months ago
JSON representation
🔢 Bailey-Borwein-Plouffe formula
- Host: GitHub
- URL: https://github.com/kaue/bbp-formula
- Owner: kaue
- License: mit
- Created: 2018-11-24T13:18:20.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T20:27:01.000Z (about 2 years ago)
- Last Synced: 2024-04-14T14:04:39.313Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 85.9 KB
- Stars: 9
- Watchers: 0
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bailey-Borwein-Plouffe formula
## Install
`npm i --save bbp-formula`
## Usage
```javascript
const bbp = require('bbp-formula');
console.time('estimation');
const calculatedPi = bbp(0);
console.timeEnd('estimation');
console.log(calculatedPi.toString());
```### Refs
- http://stackoverflow.com/questions/4484489/using-basic-arithmetics-for-calculating-pi-with-arbitary-precision