MikeMcl/big.js
View on GitHub ↗ ★ 5,203 JavaScript
A small, fast JavaScript library for arbitrary-precision decimal arithmetic.
3 mentions on Hacker News by 3 people: 0 stories, 3 comments · first 2018-04-16 · latest 2021-07-03
20082026
-
…use-cases. - It's also immutable and we can easily truncate decimal places with toFixed(dp) [5] [1] https://github.com/MikeMcl/big.js/ [2] http://mikemcl.github.io/big.js/#strict [3] http://mikemcl.github.io/big.js/#rm [4]…
comment by joshxyz · 2021-07-03 · in Ask HN: Open-source projects that handle monetary values properly -
My goto for any kind of arbitrary precision math in JavaScript is https://github.com/MikeMcl/big.js As others have noted, if you're doing any kind of math that involves floating point numbers and you will displaying them to a user, you'll…
comment by DataInSolutions · 2018-10-30 · in How to Handle Monetary Values in JavaScript -
…integer type. In cases where that isn't possible, try an infinite precision javascript library. https://github.com/MikeMcl/big.js You could _probably_ find a way to shim big.js into OP's library :)
comment by pokoleo · 2018-04-16 · in Dinero.js – JavaScript library for working with monetary values