Was getting the error - "java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result" while trying to do a divide of a BigDecimal by a BigDecimal. Found some code that I used to solve this problem above. The code I have does not look pretty. Wondering if there is a easier way to do the same.
Here's the code I have -