decimal.js
An arbitrary-precision Decimal type for JavaScript
...It allows developers to perform accurate calculations with numbers of virtually unlimited precision, making it especially useful for financial, scientific, and high-precision applications. Unlike standard JavaScript numbers, which can produce rounding errors due to binary representation, decimal.js ensures consistent and predictable results by operating on decimal values directly. The library defines a Decimal constructor that accepts numbers, strings, or existing Decimal instances, enabling flexible usage across different input types. It supports a wide range of mathematical operations, including arithmetic, logarithmic, trigonometric, and exponential functions, making it significantly more comprehensive than simpler numeric libraries.