title: Problems casting NAN floats to int
body: <p>Ignoring why I would want to do this, the 754 IEEE fp standard doesn't define the behavior for  the following:</p>
  
  <pre><code>float h = NAN;
  printf("%x %d\n", (int)h, (int)h);
  
  Gives: 80000000 -2147483648
  </code></pre>
  
  <p>Basically, regardless of what value of NAN I give, it outputs 80000000 (hex) or -2147483648 (dec). Is there a reason for this and/or is this correct behavior? If so, how come?</p>
  
  <p>The way I'm giving it different values of NaN are here:
  <a href="https://stackoverflow.com/questions/10365328/how-can-i-manually-set-the-bit-value-of-a-float-that-equates-to-nan">How can I manually set the bit value of a float that equates to NaN?</a></p>
  
  <p>So basically, are there cases where the payload of the NaN affects the output of the cast?</p>
  
  <p>Thanks!</p>