title: C++ wrong result of mathematical expression
body: <p>I have to calculate some simple mathematical expression, but when I do it in one row, the result always will be zero. But the correct result is obviously not zero. And its interesting but when I separate the parts of expression, I get the correct answer.
  Later I will divide with this result, so it should not be 0.</p>
  
  <p>The expression is like this:</p>
  
  <pre><code>(X-X1)/(X2-X1)
  </code></pre>
  
  <p>In this case the <em>delta</em>: 0</p>
  
  <pre><code>double delta = (x - x1) / (x2 - x1);
  </code></pre>
  
  <p>But this way the <em>delta</em> will be correct:</p>
  
  <pre><code>double top = x - x1;
  double bottom = x2 - x1;
  double delta = top/bottom;
  </code></pre>
  
  <p>Do you have any idea, how could this happen?</p>