title: Dividing two number without losing precision
body: <p>I am dividing two numbers <code>466489/249001</code> which results in <strong>Non-terminating decimal expansion</strong>.</p>
  
  <blockquote>
    <p>As the <code>BigDecimal</code> class stores floating-point numbers with practically unlimited precision, I have gone for it.</p>
  </blockquote>
  
  <pre><code>    BigDecimal dividend = BigDecimal.valueOf(466489L);
      BigDecimal divisor  = BigDecimal.valueOf(249001L);
      System.out.println((double)466489/249001);
      //1.8734422753322275
      System.out.println(dividend.divide(divisor, MathContext.DECIMAL128));
      //1.873442275332227581415335681382806
  </code></pre>
  
  <p>From <a href="https://www.wolframalpha.com/input/?i=466489/249001" rel="nofollow">WolframAlpha</a> I am getting the result as</p>
  
  <blockquote>
    <p>1.87344227533222758141533568138280569154340745619495504034120344898213260187710089517712780269958755185722145694193999220...</p>
  </blockquote>
  
  <p>So I suppose my result is precise. </p>
  
  <p>Now I want to know how can I get more precision in my result using <code>BigDecimal</code> as calculated by <a href="https://www.wolframalpha.com/input/?i=466489/249001" rel="nofollow">WolframAlpha</a>?</p>