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 non-decimal arithmetic. It provides accurate and reliable arithmetic operations on decimal numbers, avoiding common floating-point errors. Decimal.js is particularly useful for financial and scientific applications where precision is crucial.

Compared to native JavaScript arithmetic, Decimal.js offers precise handling of decimal numbers without loss of precision. It allows you to set the desired precision and rounding mode, making it suitable for critical calculations. Decimal.js is actively maintained and regularly updated to ensure compatibility with modern JavaScript environments.

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

Tags: javascriptarbitrary-precisiondecimal-arithmeticfinancialscientific