# @sagemath/pari

> PARI/GP is a widely used computer algebra system designed for fast computations in number theory.

Latest version **1.0.5** (published 2021-07-27) · GPL-3.0-or-later license · 0 weekly downloads

## Install

```sh
npm install @sagemath/pari
pnpm add @sagemath/pari
yarn add @sagemath/pari
bun add @sagemath/pari
```

## Health

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

Positive: no vulnerabilities; high maintenance score.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2021-07-27 |
| First published | 2021-07-02 |
| Weekly downloads | 0 |
| License | GPL-3.0-or-later |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 27.7 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | William Stein |
| Maintainers | wstein |
| Keywords | number, theory |

## Links

- npm: https://www.npmjs.com/package/@sagemath/pari
- Repository: https://github.com/sagemathinc/sagejs
- Homepage: https://github.com/sagemathinc/sagejs/tree/main/src/packages/pari
- Issues: https://github.com/sagemathinc/sagejs/issues
- npm.io page: https://npm.io/package/@sagemath/pari

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 1.0.5 (latest) — 2021-07-27
- 1.0.4 — 2021-07-23
- 1.0.3 — 2021-07-04
- 1.0.2 — 2021-07-02
- 1.0.1 — 2021-07-02
- 1.0.0 — 2021-07-02

## README

# Pari without GMP

DEPRECATED: See the @sagemath/pari-gmp package instead, which is only slightly larger and significantly faster. Future development work will go there.

## Quickstart

Install the package

```sh
npm i @sagemath/pari
```

Then use it from node.js as follows:

```js
> (async ()=>global.gp = await require('@sagemath/pari')())()
Promise { <pending> }
> gp('factor(2^128 + 1)')
'%1 = 5\n'
> gp('\\p100')
   realprecision = 105 significant digits (100 digits displayed)
'\n'
> gp('contfrac(Pi)')
'%4 = [3, 7, 15, 1, 292, 1, 1, 1, 2, 1, 3, 1, 14, 2, 1, 1, 2, 2, 2, 2, 1, 84, 2, 1, 1, 15, 3, 13, 1, 4, 2, 6, 6, 99, 1, 2, 2, 6, 3, 5, 1, 1, 6, 8, 1, 7, 1, 2, 3, 7, 1, 2, 1, 1, 12, 1, 1, 1, 3, 1, 1, 8, 1, 1, 2, 1, 6, 1, 1, 5, 2, 2, 3, 1, 2, 4, 4, 16, 1, 161, 45, 1, 22, 1, 2, 2, 1, 4, 1, 2, 24, 1, 2, 1, 3, 1, 2, 1, 1, 10, 2, 5]\n'
```

## Build from source

You need to install [emscripten](https://emscripten.org/docs/getting_started/downloads.html). Then do

```
npm run build
```

## Problems/TODO

### Interrupting running code

Try `gp(factor(2^2001+1))` and hit control+c to try to interrupt the running computation. It terminates the Node.js interpreter as well, and there is no way to catch this.

### Using with webpack5 in your browser

Make it easy to use this in frontend browser code bundled up using webpack.

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