title: If FLT_HAS_SUBNORM is 0, then shall conversion (float)1E-45 return 0x1p-149?
body: <p>Simple question: If <code>FLT_HAS_SUBNORM</code> is 0, then shall conversion <code>(float)1E-45</code> return <code>0x1p-149</code>?</p>
  <p>Reason of the question: ISO/IEC 9899:2011 (E) specifies behavior of <code>FLT_HAS_SUBNORM</code> / <code>DBL_HAS_SUBNORM</code> <em>only</em> wrt <em>floating-point operations</em>. According to H.2.3.2 (Floating-point operations) <em>conversion between floating-point precisions</em> (term which is taken from F.3 Operators and functions) is <em>not</em> floating-point operation. Hence, behavior specified for <code>FLT_HAS_SUBNORM</code> / <code>DBL_HAS_SUBNORM</code> is irrelevant for <em>conversion between floating-point precisions</em>. Therefore, the conclusion is that conversion <code>(float)1E-45</code> shall return <code>0x1p-149</code>. Is this conclusion correct?</p>
  <p>UPD: Explanation of the reasons of these questions: currently I have tests which test the correctness of results generated by FP operations (conversions included). I run these tests under environments with <code>FLT_HAS_SUBNORM is 0</code> and with <code>FLT_HAS_SUBNORM is -1</code>. The main issue is that in some combinations of compiler options some tests are failing.
  For example: under <code>FLT_HAS_SUBNORM is 0</code>:</p>
  <ul>
  <li>HW (FPU) FP: <code>(float)1E-45</code> returns <code>0x1p-149f</code></li>
  <li>SW (libfp) FP: <code>(float)1E-45</code> returns <code>0.0f</code></li>
  </ul>
  <p>Reference value in test: <code>0.0f</code>.</p>
  <p>Therefore, there is a need to understand if:</p>
  <ul>
  <li>Test has a bug (written incorrectly: for example, no check for <code>HAS_SUBNORM</code>); or</li>
  <li>Compiler has a bug; or</li>
  <li>SW (libfp) FP has a bug; or</li>
  <li>HW (FPU) FP has a bug (bug in simulator; it happens too); or</li>
  <li>All possible combinations of the previous cases.</li>
  </ul>
  <p>The first step is to read the standards (C / IEEE 754) and try to answer the open questions. However, it turns out that wrt FP many aspects are not explicitly defined. Hence, what is the most rational way to handle the situation with existing failing tests?</p>
  <p>Please also note that ideally tests are written independently and in a &quot;generic way&quot; (examining the features of the system / environment: checking feature macros, checking limits, etc.), i.e. w/o knowing a particular FP details of a particular compiler used for FP computations (or as people call it <em>FP environment</em>).</p>