title: different values for float and double
body: <p>I don't understand why are float values different from double values. From the example bellow it appears that float provides different result than double for the same operation:</p>
  
  <pre><code>public class Test {
  
      public static void main(String[] args) {
          double a = 99999.8d;
          double b = 99999.65d;
          System.out.println(a + b);
  
          float a2 = 99999.8f;
          float b2 = 99999.65f;
          System.out.println(a2 + b2);
      }
  }
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>199999.45
  199999.44
  </code></pre>
  
  <p>Can you explain what makes this difference between float and double?</p>