Re:How to Handle Monetary Values in JavaScript
by sk5t on Tuesday October 30, 2018 @04:19PM
(#18340921)
This approach, at least in languages like C and Java, would effectively smush the effective MAX_INT down to MAX_INT/1e15 or whatever. No bueno.
[ Parent
| on HN ]
Re:How to Handle Monetary Values in JavaScript
by strainer on Tuesday October 30, 2018 @04:48PM
(#18341159)
It doesn't because basically - the point floats. The max_int doesn't mean the largest whole number that can be represented, it effectively means how much resolution you have on the number line in every one of a very wide range of scales.
These languages all give exactly the same standard IEEE754 float math results for basic operations.