Strange sum problem
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1458633/elegant-workaround-for-javascript-floating-point-number-problem">Elegant workaround for JavaScript floating point number problem</a>  </p>
</blockquote>



<pre><code>var sum = 0;
$('[id$=percentOfTotalEditor]').each(
    function () {
        var igEditor = $find(this.id);
        var value = igEditor.get_value();
        sum += value;
    }
);
</code></pre>

<p>Then you'll see the magic:</p>

<p>sum == 1.1, value == 0.1. But after sum += value, sum == 1.2000000000000001</p>

<p>WTF!?</p>
