1.0.4 • Published 2 years ago

@joshyzou/pisolver v1.0.4

Weekly downloads
22
License
MIT
Repository
github
Last release
2 years ago

Chudnovsky Pi Solver

Use this npm package to calculate pi. You just give it the number of digits you want to solve for, including the first digit - "3." This package will then return a string of the digits of pi without the decimal point. For example, if you want 5 digits, it will return 31415. This package uses the Chudnovsky algorithm to solve for pi. If you want the final number as a string, then use "false" for the second option, but if you want the final number as a big number, pass the value "true" instead.

pisolver({num. of digits}, {optional true/false})

Usage

var pisolver = require("@joshyzou/pisolver")
let x = pisolver("50", true);
//The variable x will be a number, and not a string
var pisolver = require("@joshyzou/pisolver")

let x = pisolver(50);
x.then(function(result){
console.log(result)

});

//will output 31415926535897932384626433832795028841971693993746 as a string, and not a number

npm.io

1.0.4

2 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

0.0.0

3 years ago