title: Java Modulus 1 (%1) returns approximate value
body: <p>I've got sample code</p>
  
  <pre><code>double k=3.14, l=0.5, m=1.3333;
          System.out.println(k+":"+k%1);
          System.out.println(l+":"+l%1);
          System.out.println(m+":"+m%1);
  </code></pre>
  
  <p>which results in output:</p>
  
  <pre><code>3.14:0.14000000000000012
  0.5:0.5
  1.3333:0.33329999999999993
  </code></pre>
  
  <p>Why is it so? I expected x%1 to return non-integer part of the value of x?</p>