Chris09/17/2018, 9:35 AM
? I would like the exact number of deciaml digits, ie. 424.234 would return 3 or “234” (either would be good) thanks in advance.
robin09/17/2018, 9:45 AM
. Problem is this can quickly give unexpected results because of precision errors with the double type. For example
(0.1 + 0.2).toString().split('.').length
, when it should intuitively be
, because of rounding errors. Better to go to using BigDecimals for this kind of job
Chris09/17/2018, 9:52 AM
karelpeeters09/17/2018, 10:07 AM
, inifnity, scientific notation, ...
robin09/17/2018, 10:20 AM