3 ms·
A currency amount is just a rational number with "1000000" as a denominator. This is the correct representation, and how Google or the blockchain do it.
by otabdeveloper4 5y ago
A currency amount is just a rational number with "1000000" as a denominator.
This is the correct representation, and how Google or the blockchain do it.
- sirk390 5y agoI don't thing there is a more "correct" representation. Representing it as a string is equaly correct. Blockchain or banking often represents money as an integer with the smallest divisible unit (cent, or satoshi), but it is not applicable here because there is no smallest divisible unit.