title: Strange pow(x, y); behaviour
body: <p>While doing my homework I noticed something really strange that I just can't figure out why.</p>
  
  <pre><code>int x = 5;
  cout &lt;&lt; pow(x, 2);
  </code></pre>
  
  <p>The result is 25. That's fine. But if I write the same program like this:</p>
  
  <pre><code>int x = 5;
  int y = pow(x, 2);
  cout &lt;&lt; y;
  </code></pre>
  
  <p>The result is 24!</p>
  
  <p>When x is 2, 3, 4, 6, 7, 8 no problem, but with 5, 10, 11, 13 etc. result is 1 lower than it should be.</p>
  
  <p>Same thing with if().</p>
  
  <pre><code>for (int x = 1; x &lt;= 20 ; x++) {
      if (x * x == pow(x, 2)) 
      cout &lt;&lt; x &lt;&lt; endl;
  }
  </code></pre>
  
  <p>It prints out numbers 1, 2, 3, 4, 6, 8, 12, 16. </p>