title: Intel architecture and IEEE 754 compliance (minNum and maxNum)?
body: <p>I've been taking a look at the x64 software developer manual and it looks like the built-in {MIN|MAX}{S|P}{S|D} instructions do not implement the functions that are called minNum and maxNum in the IEEE 754 standard, despite Intel claiming in the same document that their CPUs are fully compliant.</p>
  
  <p>Intel operations always return the <em>second</em> operand if either operand is a QNaN and neither is an SNaN, while minNum and maxNum return the <em>other</em> operand, i.e.:</p>
  
  <pre><code>IEE 754:
  minNum(1.0, QNaN) -&gt; 1.0
  minNum(QNaN, 1.0) -&gt; 1.0
  
  Intel x64:
  MIN(1.0, QNaN) -&gt; QNaN
  MIN(QNaN, 1.0) -&gt; 1.0
  </code></pre>
  
  <p>Am I correct that standard-compliant minNum/maxNum functions have to be emulated with an additional check of the first operand and cannot be directly translated to the corresponding instructions?</p>