title: NaN comparison rule in C/C++
body: <p>Doing some optimziation on a piece of code, the correctness of the code depending on how the compiler handle NaNs.</p>
  
  <p>I read the IEEE-754 rules on NaN, which states:</p>
  
  <blockquote>
    <p>The comparisons EQ, GT, GE, LT, and LE, when either or both operands
    is NaN returns FALSE.</p>
    
    <p>The comparison NE, when either or both operands is NaN returns TRUE.</p>
  </blockquote>
  
  <p>Are the above rules enforced in C/C++?</p>