title: LUA (Corona SDK) math.floor() return wrong value with increment of 0.1
body: <p>I have a strange bug when i use <strong>Math.floor</strong> function on double values incremented of <strong>0.1</strong> each time.</p>
  
  <p>It happens only with an increment of 0.1 and start at value 5</p>
  
  <p>Exemple : math.floor(4) return <strong>4</strong> but math.floor(5) return <strong>4</strong> !!!</p>
  
  <p>You can try it yourself, with this simple piece of code :</p>
  
  <pre><code>for i=3,7,0.1 do 
      print("val : "..i.." floor : "..math.floor(i))
  end
  </code></pre>
  
  <p>Here is the result of the above code :</p>
  
  <pre><code> Corona Simulator[1494:707] val : 3 floor : 3
   Corona Simulator[1494:707] val : 3.1 floor : 3
   Corona Simulator[1494:707] val : 3.2 floor : 3
   Corona Simulator[1494:707] val : 3.3 floor : 3
   Corona Simulator[1494:707] val : 3.4 floor : 3
   Corona Simulator[1494:707] val : 3.5 floor : 3
   Corona Simulator[1494:707] val : 3.6 floor : 3
   Corona Simulator[1494:707] val : 3.7 floor : 3
   Corona Simulator[1494:707] val : 3.8 floor : 3
   Corona Simulator[1494:707] val : 3.9 floor : 3
   Corona Simulator[1494:707] val : 4 floor : 4
   Corona Simulator[1494:707] val : 4.1 floor : 4
   Corona Simulator[1494:707] val : 4.2 floor : 4
   Corona Simulator[1494:707] val : 4.3 floor : 4
   Corona Simulator[1494:707] val : 4.4 floor : 4
   Corona Simulator[1494:707] val : 4.5 floor : 4
   Corona Simulator[1494:707] val : 4.6 floor : 4
   Corona Simulator[1494:707] val : 4.7 floor : 4
   Corona Simulator[1494:707] val : 4.8 floor : 4
   Corona Simulator[1494:707] val : 4.9 floor : 4
   Corona Simulator[1494:707] val : 5 floor : 4
   Corona Simulator[1494:707] val : 5.1 floor : 5
   Corona Simulator[1494:707] val : 5.2 floor : 5
   Corona Simulator[1494:707] val : 5.3 floor : 5
   Corona Simulator[1494:707] val : 5.4 floor : 5
   Corona Simulator[1494:707] val : 5.5 floor : 5
   Corona Simulator[1494:707] val : 5.6 floor : 5
   Corona Simulator[1494:707] val : 5.7 floor : 5
   Corona Simulator[1494:707] val : 5.8 floor : 5
   Corona Simulator[1494:707] val : 5.9 floor : 5
   Corona Simulator[1494:707] val : 6 floor : 5
   Corona Simulator[1494:707] val : 6.1 floor : 6
   Corona Simulator[1494:707] val : 6.2 floor : 6
   Corona Simulator[1494:707] val : 6.3 floor : 6
   Corona Simulator[1494:707] val : 6.4 floor : 6
   Corona Simulator[1494:707] val : 6.5 floor : 6
   Corona Simulator[1494:707] val : 6.6 floor : 6
   Corona Simulator[1494:707] val : 6.7 floor : 6
   Corona Simulator[1494:707] val : 6.8 floor : 6
   Corona Simulator[1494:707] val : 6.9 floor : 6
   Corona Simulator[1494:707] val : 7 floor : 6
  </code></pre>
  
  <p>If it can help, if we applied a <strong>modulo 1</strong> on the result of a buggy value, we get this as result : <strong>0.99999999999999</strong></p>