title: BigDecimal divide method either returns 0 or ArithmeticException?
body: <p>When I try dividing BigDecimals using the method:</p>
  
  <p><code>divide(divisor, RoundingMode.HALF_UP)</code></p>
  
  <p>it returns 0</p>
  
  <p><a href="https://i.stack.imgur.com/pfFOB.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pfFOB.jpg" alt="enter image description here"></a></p>
  
  <p>But if I do it without a rounding mode like this:</p>
  
  <p><code>divide(divisor)</code></p>
  
  <p>I get an ArithmeticException</p>
  
  <p><a href="https://i.stack.imgur.com/KLE37.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KLE37.jpg" alt="enter image description here"></a></p>
  
  <p>I don't care if the number is not an exact decimal representation. How do I divide BigDecimals without getting 0 or exceptions?</p>