I have to calculate some floating point variables and my colleague suggest me to use BigDecimal
instead of double
since it will be more precise. Bu
There are two main differences from double:
The reason you should use BigDecimal for monetary calculations is not that it can represent any number, but that it can represent all numbers that can be represented in decimal notion and that include virtually all numbers in the monetary world (you never transfer 1/3 $ to someone).