I'm facing a new problem..I use BigDecimal for money input. There is a little problem. Let's take a look at this piece of code:
BigDecimal a = BigDecimal.valueOf(5);
BigDecimal b = BigDecimal.valueOf(3);
BigDecimal result = a.divide(b);
The result is:
1.67
But if I do:
1.67 * 3 = 5.01
And that's cause problem in my code. So I need to obtain exactly 5. So 5/3 should be 1.67 + 1.67 + 1.66. Is it possible to achieve that?