Closed marek-mihok closed 5 months ago
I think 20 decimal points should be enough for now
wdyt @pascal-pfeiffer?
20 decimals is enough for our needs. Sounds good! If there happens to be a new case that needs more, we can reconsider alternatives.
Thank you @marek-mihok !
The PR fulfills these requirements: (check all the apply)
main
branch.feat: Add a button #xxx
, where "xxx" is the issue number).Closes #xxx
, where "xxx" is the issue number.ui
folder, unit tests (make test
) still pass.The problem was with
calculatePrecision
function not working with scientific (exponential) notation numbers.The fix converts scientific notation numbers to regular decimal numbers and it uses
Number.toFixed()
for conversion.This solution is simple but works for numbers with up to 20 decimal points. To support more decimal points, it would need more complicated solution (something like this one but more reliable).
I think 20 decimal points should be enough for now and if it won't, someone will open the new issue. Wdyt @mturoci ?
Closes #1525