# @joshyzou/pisolver

> calculates pi when you input the number of digits to calculate to.

Latest version **1.0.4** (published 2022-04-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @joshyzou/pisolver
pnpm add @joshyzou/pisolver
yarn add @joshyzou/pisolver
bun add @joshyzou/pisolver
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2022-04-28 |
| First published | 2021-01-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | joshyzou |
| Keywords | pi, math, solve, joshyzou |

## Links

- npm: https://www.npmjs.com/package/@joshyzou/pisolver
- Repository: https://github.com/Joshua-Zou/piCalculator
- Homepage: https://github.com/Joshua-Zou/piCalculator#readme
- Issues: https://github.com/Joshua-Zou/piCalculator/issues
- npm.io page: https://npm.io/package/@joshyzou/pisolver

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2022-04-28
- 1.0.3 — 2021-05-27
- 1.0.2 — 2021-03-03
- 1.0.1 — 2021-03-03
- 0.1.4 — 2021-02-01
- 0.1.3 — 2021-01-31
- 0.0.10 — 2021-01-31
- 0.0.9 — 2021-01-31
- 0.0.8 — 2021-01-31
- 0.0.7 — 2021-01-31
- 0.0.6 — 2021-01-31
- 0.0.5 — 2021-01-31
- 0.0.3 — 2021-01-31
- 0.0.2 — 2021-01-31
- 0.0.1 — 2021-01-31
- … 1 more at https://npm.io/package/@joshyzou/pisolver/versions

## README

# 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](https://en.wikipedia.org/wiki/Chudnovsky_algorithm) 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
```
 ![](https://analytics-server-orpin.vercel.app/api/npm_package?name=pisolver)

---
_Source: https://npm.io/package/@joshyzou/pisolver · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
