Created
February 18, 2014 10:23
-
-
Save sysnajar/9068243 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result. | |
To fix, you need to do something like this: | |
a.divide(b, 2, RoundingMode.HALF_UP) | |
where 2 is precision and RoundingMode.HALF_UP is rounding mode | |
http://stackoverflow.com/questions/4591206/arithmeticexception-non-terminating-decimal-expansion-no-exact-representable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment