# Well, that helps
I've just learned something (the hard way) - if you use BigDecimal.divide() and your quotient has a recurring decimal, you get a big fat:
java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result.
BigDecimal values are nice and quick for adding up things like monetary amounts, certainly faster and kinder to your electricity bill than Doubles, but the safest approach for dividing BigDecimals seems to be to drop to primitive doubles and then re-build from there.
Now maybe it's just me, but I don't think there's much point in having a divide method if you have to remember that it only sorta-kinda works. The BigDecimal JavaDocs are clear about the risks, but still.
File under: java : {2007.07.06 - 00:00}