title: floating point issue in R?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/9508518/why-are-these-numbers-not-equal">Why are these numbers not equal?</a>  </p>
  </blockquote>
  
  
  
  <p>The below expression, which evaluates to 0.1, is considered larger than 0.1. </p>
  
  <pre><code>&gt; round(1740/600,0) - 1740/600
  [1] 0.1
  &gt; (round(1740/600,0) - 1740/600) &lt;= 0.1
  [1] FALSE //???!!???
  &gt; (round(1740/600,0) - 1740/600) &lt;= 0.1000000000000000000000000000000000000001
  [1] TRUE
  </code></pre>
  
  <p>Thinking that the issue might be due to rounding I tried this with the same result:</p>
  
  <pre><code>&gt; 3 - 2.9
  [1] 0.1
  &gt; (3 - 2.9) &lt;=0.1
  [1] FALSE
  </code></pre>
  
  <p>So, what gives and how do I fix it without fudging the cutoff?</p>