Trying to format a number like 123456789201921 reveals the underlying issue with float-precision math that JS has. The result is something like 123,456,789,201,920.992 while it should be 123,456,789,201,921.
I stumbled upon this while working on my own fork of Numeral-JS. The issue can probably only be solved if using a specialized library like Big.js
Of course, this is probably an edge case, but perhaps it is something to be considered.
Sorry for the radio silence on this one. If you're still interested in finding a solution, what would you propose? To add support for formatting Big.js instances -- or maybe even strings?
Trying to format a number like
123456789201921
reveals the underlying issue with float-precision math that JS has. The result is something like123,456,789,201,920.992
while it should be123,456,789,201,921
.I stumbled upon this while working on my own fork of Numeral-JS. The issue can probably only be solved if using a specialized library like Big.js
Of course, this is probably an edge case, but perhaps it is something to be considered.