indutny/bn.js
BigNum in pure javascript observed · 2026-08-28
Health v2 · maintenance only
64/100
- Activity 91
- Release rhythm 8
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 4512
- days_rel: n/a
- days_push: 55
- n_releases_24m: 0
Adoption not part of the score
1230 stars · 154 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
bn.js is a pure JavaScript arbitrary-precision integer (BigNum) arithmetic library supporting addition, multiplication, modular reduction, Montgomery reduction, and bit operations. It runs in both Node.js and browsers with no native dependencies.
Use cases
- do big integer arithmetic in javascript
- implement cryptography like RSA or ECC in JS
- handle numbers larger than Number.MAX_SAFE_INTEGER
- perform modular arithmetic and Montgomery multiplication
- convert big integers between bases and byte arrays
When to choose
- you need arbitrary-precision integers in Node.js or the browser without native modules
- you need a battle-tested bignum library used by crypto libraries like elliptic
- you need integer-only math (no decimals) with in-place operation optimizations
When to avoid
- you need decimal or floating-point arithmetic
- you need BigInt-level performance and can use native JS BigInt instead
- you need arbitrary-precision decimals like for financial calculations
Facets
library · maturity stable
math serialization developer-tools browser cross-platform bignum arbitrary-precision-arithmetic biginteger montgomery-reduction pure-javascript algorithms cryptography nodejs javascript
2 sources
- readme: https://github.com/indutny/bn.js · fetched 2026-08-28 · ebd8d4a64c17
- registry_npm: https://registry.npmjs.org/bn.js · fetched 2026-08-29 · ed45fd617411
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| indutny/bn.js | main | 64 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem