# bs-zarith

> Support Unsigned, Bigint, Bigfloat, Q (rational numbers) and Z (integer numbers) in BuckleScript

Latest version **3.2.0** (published 2022-12-02) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install bs-zarith
pnpm add bs-zarith
yarn add bs-zarith
bun add bs-zarith
```

## 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 | 3.2.0 |
| Published | 2022-12-02 |
| First published | 2018-06-21 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 365.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 15 |
| Author | James M.C. Haver II |
| Maintainers | mchaver, shulhi |
| Keywords | bucklescript |

## Links

- npm: https://www.npmjs.com/package/bs-zarith
- Repository: https://github.com/plow-technologies/bs-zarith
- Homepage: https://github.com/plow-technologies/bs-zarith#readme
- Issues: https://github.com/plow-technologies/bs-zarith/issues
- npm.io page: https://npm.io/package/bs-zarith

## Recent versions

- 3.2.0 (latest) — 2022-12-02
- 3.1.0 — 2020-10-25
- 3.0.0 — 2020-06-13
- 2.0.0 — 2020-06-04
- 1.1.0 — 2020-02-20
- 1.0.1 — 2019-04-23
- 1.0.0 — 2018-06-21

## README

# bs-zarith

The API is stable, but there is not a lot of testing. Use with caution.

## Bigint

```OCaml
let x = Bigint.of_string "1000000000000000000000000000000000000000" in
let y = Bigint.of_int 1 in
let z = Bigint.(y + x) in
Js.log(Bigint.to_string(z));
```

## Z

```
let x = Z.Int64.of_string "230000232323322323" in
let y = Z.Int64.of_int 3 in
let z = Z.Int64.(x - y) in
Js.log(Z.Int64.to_string(z));
```

## Q

```
let x = Q.Int.of_string "1/2" in
let y = Q.Int.make (Z.Int.one) (Z.Int.of_int 2)
let z = Q.Int.sub x y
Js.log(Q.Int.to_string(z));
```

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