Decimal.js: Detailed Overview & Metrics

v10.4.3(over 1 year ago)

This package was last published over a year ago. It may not be actively maintained.Types definitions are bundled with the npm packageNumber of direct dependencies: 0Monthly npm downloads

Decimal.js is a JavaScript library for arbitrary-precision decimal and floating-point arithmetic. It provides accurate and reliable calculations for decimal numbers, avoiding common issues with floating-point arithmetic in JavaScript. Decimal.js offers a wide range of mathematical operations, including addition, subtraction, multiplication, division, and more, with customizable precision and rounding options.

Compared to native JavaScript number handling, Decimal.js ensures precision and consistency in calculations, making it suitable for financial applications, scientific computations, and any scenario where accurate decimal arithmetic is crucial. It is actively maintained, with regular updates and a growing community of users.

Alternatives:
bignumber.js+
big.js+
mathjs+
numbro+
fraction.js+
accounting-js+
currency.js+
dinero.js+
money-math+
simple-money+

Tags: javascriptarbitrary-precisiondecimal-arithmeticmathematicslibrary