BigDecimalAmount.divideAndRemainder(MonetaryAmount) and divideToIntegralValue(MonetaryAmount) both unnecessary convert the divisor from BigDecimal to double and back again, potentially loosing some precision.
The 1st commit adds tests showing this. The 2nd fixes it.
BigDecimalAmount.divideAndRemainder(MonetaryAmount) and divideToIntegralValue(MonetaryAmount) both unnecessary convert the divisor from BigDecimal to double and back again, potentially loosing some precision. The 1st commit adds tests showing this. The 2nd fixes it.