title: Javascript decimal increment?
body: <p>I've got the following variable JS:</p>
  
  <p><a href="http://jsfiddle.net/c8u8wLsL/13/" rel="nofollow">http://jsfiddle.net/c8u8wLsL/13/</a></p>
  
  <pre><code>$(document).ready(function () {
      var total = 15.5,
          value = 0,
          elem = $('div');
  
      var interval = setInterval(function () {
          elem.text(value.toFixed(1) + '$');
  
          if (value &gt;= total) {
              clearInterval(interval);
          }
          value = value + 0.1;
      }, 5);
  });
  </code></pre>
  
  <p><strong>Two questions:</strong> </p>
  
  <ul>
  <li>The resulting number is <code>15.6</code> why?</li>
  <li>How can I make the incrementation spend the same amount of time from 0 to the target value? (from 0 to 25 spends the same time as from 0 to 250)</li>
  </ul>