fork download
  1. #include <math.h>
  2. #include <limits.h>
  3. #include <float.h>
  4. #include <stdio.h>
  5.  
  6. float float_min()
  7. {
  8. int exp_bit = CHAR_BIT * sizeof(float) - FLT_MANT_DIG;
  9. float exp = 2 - pow(2, exp_bit - 1);
  10.  
  11. float m = pow(2, -(FLT_MANT_DIG - 1));
  12.  
  13. return m * pow(2, exp);
  14. }
  15.  
  16. int main()
  17. {
  18. printf("%g\n", float_min());
  19. }
Success #stdin #stdout 0s 9432KB
stdin
Standard input is empty
stdout
1.4013e-45