title: Javascript: Comparing two float values
body: <p>I have this JavaScript function:</p>
  
  <pre><code>Contrl.prototype.EvaluateStatement = function(acVal, cfVal) {
  
      var cv = parseFloat(cfVal).toFixed(2);
      var av = parseFloat(acVal).toFixed(2);
  
     if( av &lt; cv) // do some thing
  }
  </code></pre>
  
  <p>When i compare float numbers <code>av=7.00</code> and <code>cv=12.00</code> the result of <code>7.00&lt;12.00</code> is <code>false</code>!</p>
  
  <p>Any ideas why?</p>