title: Why doesn't my operation work when I use BigDecimal?
body: <p>I'm trying to do an operation using <code>BigDecimal</code> but it always return <code>0</code>. Why does it work when I use <code>double</code>?</p>
  
  <pre><code>public static void main(String[] args) {
      double a = 3376.88;
      BigDecimal b = new BigDecimal(a);
      System.out.println(a-a/1.05);
      System.out.println(b.subtract(b).divide(new BigDecimal(1.05)).doubleValue());
  }
  </code></pre>
  
  <p>Thanks.</p>