Skip to content
CCPEDIAby Unity Nodes
Discussions/App Development/Decimal math in TypeScriptForum ↗

Decimal math in TypeScript

App Development2 posts309 views2 likesLast activity Nov 2022
MI
Michael_SchaefferOP
Nov 2022

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

CO
cocreature
Nov 2022

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

← Back to Discussions