
4 Apr
2017
4 Apr
'17
9:46 a.m.
2017-04-04 7:05 GMT+02:00 Manuel Gómez
[...] Check whether regulatory compliance affects your choice of semantics.
This is the most important advice: You'll probably run into legal trouble if you choose e.g. the wrong rounding mode, and for a good reason: If you handle millions of transactions in your system and sneakily always round cents "into your own pocket", you'll be a rich man. That's the reason behind the tons of rounding modes in e.g. http://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html. Ask your local lawyer which is the right one. ;-) I have serious doubts that you can handle such things with a floating point representation.