title: Weird bug with floats in if-statement
body: <p>So in my C++ code I have the following line of code for debugging purposes:</p>
  
  <pre><code>if(float1 != float2)
  {
      std::cout&lt;&lt;float1&lt;&lt;" "&lt;&lt;float2&lt;&lt;std::endl;
  }
  </code></pre>
  
  <p>What's happening is that the program is entering into the if-statement...but when I print out the two float values they are the same. But if they were the same, then it should bypass this if-statement completely. So I'm really confused as to why this is happening.</p>