Principle of java float number calculation error
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2100490/floating-point-inaccuracy-examples">Floating point inaccuracy examples</a>  </p>
</blockquote>



<p>In the first, I apologize for my poor English.</p>

<p>We all know Java float number calculation error. Such as follows:</p>

<pre><code>System.out.println(0.0934 * 1000);
System.out.println(0.0935 * 1000);
System.out.println(0.0936 * 1000);
</code></pre>

<p>The result is</p>

<pre><code>93.39999999999999
93.5
93.60000000000001
</code></pre>

<p>And we can use <em>BigDecimal</em> to resolve this problem.</p>

<p><strong>I want to know the principle of the error. What reason caused the problem.</strong></p>

<p>Thanks.</p>
