Decimal math in TypeScript

Given that Decimal ledger values are encoded by the TypeScript bindings as string values (to avoid loss of precision), is there a recommended library for mathematical operations on these values?

https://docs.daml.com/0.13.54/daml2ts/index.html#primitive-daml-types-daml-types

I’ve used GitHub - MikeMcl/decimal.js: An arbitrary-precision Decimal type for JavaScript successfully but I haven’t tested other libraries extensively.

2 Likes