Hacker News new | ask | show | jobs
by oblio 3360 days ago
Warning: I don't program applications for finance. However... I'm not sure that representing things in cents works. Mostly because of exchange rates. These can have quite a bit of decimals and go beyond cent-precision.

My money's on BigIntegers: https://msdn.microsoft.com/en-us/library/system.numerics.big..., using some sort of subdivision of cents as the base unit (1/1000ths of cents?)

I'm probably horribly wrong and I hope someone who actually knows what he's saying corrects me :)

1 comments

> My money's on BigIntegers: https://msdn.microsoft.com/en-us/library/system.numerics.big..., using some sort of subdivision of cents as the base unit (1/1000ths of cents?)

I was thinking something along these lines too. Would love to know what they used and the justifications behind their decision.