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 precise and reliable calculations for decimal numbers, avoiding common floating-point errors encountered in standard JavaScript arithmetic. Decimal.js offers a wide range of mathematical operations, including addition, subtraction, multiplication, division, and more, with customizable precision settings.

Compared to native JavaScript arithmetic, Decimal.js ensures accurate results for financial calculations, scientific computations, and any scenario requiring high precision. It is actively maintained and widely used in projects where precision and consistency in decimal arithmetic are crucial.

Alternatives: bignumber.js, big.js, math.js

Tags: javascriptarbitrary-precisiondecimal-arithmeticmathematicslibrary