title: The minimum positive float value by direct calculation is different from the FLT_MIN in <float.h>
body: <p>I want to directly calculate the minimum value of the <code>float</code> type, and here is my algorithm(Suppose that the encoding of floating-point number confirms to the IEEE 754 standard):</p>
  
  <pre><code>#include &lt;math.h&gt;
  #include &lt;limits.h&gt;
  #include &lt;float.h&gt;
  #include &lt;stdio.h&gt;
  
  float float_min()
  {
      int exp_bit = CHAR_BIT * sizeof(float) - FLT_MANT_DIG;
      float exp = 2 - pow(2, exp_bit - 1);
  
      float m = pow(2, -(FLT_MANT_DIG - 1));
  
      return m * pow(2, exp);
  }
  
  int main()
  {
      printf("%g\n", float_min());
  }
  </code></pre>
  
  <p>The output is <code>1.4013e-45</code>. However, I find the the value of <code>FLT_MIN</code> in the <code>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\float.h</code> is <code>1.175494351e-38F</code>. Who is wrong?</p>