title: Whats wrong with this simple 'double' calculation?
body: <p>Whats wrong with this simple 'double' calculation in java?</p>
  
  <p>I know some decimal numbers can not be represented in float / double binary formats properly, but with the variable d3, java is able to store and display 2.64 with no problems.</p>
  
  <pre><code>double d1 = 4.64;
  double d2 = 2.0;
  double d3 = 2.64;
  double d4 = d1 - d2;
  
  System.out.println("d1      : " + d1);
  System.out.println("d2      : " + d2);
  System.out.println("d3      : " + d3);
  System.out.println("d4      : " + d4);
  System.out.println("d1 - d2 : " + (d1 - d2));
  </code></pre>
  
  <p>Answer,</p>
  
  <pre><code>d1      : 4.64
  d2      : 2.0
  d3      : 2.64
  d4      : 2.6399999999999997
  d1 - d2 : 2.6399999999999997
  </code></pre>