title: The < operation is behaving like <= for specific values of a double variable
body: <p>I recently started learning C++ from the starting and am currently studying from Bjarne Stroustrup's "Programming Principles and Practice using C++". There is an exercise to try to find the larger of two numbers inputted by the user and if they are less than 0.01 apart output "The numbers are almost equal". However the &lt; operation I used in my if statement is working like &lt;= for an unknown reason.</p>
  
  <pre><code>        if(num1&lt;num2)
      {
          diff=num2-num1;
          std::cout&lt;&lt;"\nThe smaller value is: "&lt;&lt;num1;
          std::cout&lt;&lt;"\nThe larger value is: "&lt;&lt;num2;
          if(diff&lt;0.01)
          {
              std::cout&lt;&lt;"\nThe numbers are almost equal";
          }
      }
  </code></pre>
  
  <p>If i input the numbers as 5 and 5.01 the inner if statement is triggered. But the weirder thing I noticed is that the if statement is not triggered if 64 and 64.01 are enetered. This is the case for all numbers from 64 to 127.99 after which the same error comes back.</p>
  
  <p>I'm totally clueless as to what is causing this.</p>