Bn.js: Detailed Overview & Metrics

v4.12.1(10 days ago)

This package is actively maintained.Types definitions are provided via a separate npm package: @types/bn.jsNumber of direct dependencies: 0Monthly npm downloads

Bn.js is a high-performance JavaScript library for arbitrary-precision integer arithmetic. It is commonly used in cryptographic algorithms, big number calculations, and other scenarios where precision and performance are crucial. Bn.js provides a wide range of operations for working with large integers, including addition, subtraction, multiplication, division, and modular arithmetic.

Compared to native JavaScript number handling, Bn.js offers precise calculations without the risk of overflow or loss of precision. It is actively maintained and optimized for performance, making it a reliable choice for applications that require handling large numbers.

Alternatives:
big.js+
bignumber.js+
decimal.js+
jsbi+
big-integer+
long+
mathjs+
bigdecimal.js+
bigfloat+
big.js+

Tags: javascriptarbitrary-precisioninteger-arithmeticcryptographic-algorithmsperformance