Hacker News new | ask | show | jobs
by blowski 2386 days ago
I like this approach. Is it compatible with the parent comment?
1 comments

Yes, the parent approach is the same thing but with a decimal point added for convenience. The main thing is that the scale is fixed; it is effectively an integer count of 1s of the least significant index. It is impossible to truncate values or round upward and create money that didn't exist. This makes it perfect for representing actual money.