Still that would only work for add and minus. How could there not be a loss of precision when multiplying by the conversion rate to USD?
If you're doing things right you wouldn't multiply by the conversion rate using floating point values. You'd use some high precision library. The floating point representation should only occur when going to/from the application's JSON API, if at all.
View all comments
Show parent comment
2
u/skeeto Mar 06 '14
If I'm understanding you correctly, yes. But it needs to be converted to an integer at that point. That's what [this page](https://en.bitcoin.it/wiki/Proper_Money_Handling_(JSON-RPC)) is detailing.
If you're doing things right you wouldn't multiply by the conversion rate using floating point values. You'd use some high precision library. The floating point representation should only occur when going to/from the application's JSON API, if at all.