home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 4 / FreshFish_May-June1994.bin / bbs / gnu / gcc-2.3.3-bin.lha / lib / gcc-lib / amigados / 2.3.3 / include / float.h next >
Encoding:
C/C++ Source or Header  |  1994-02-06  |  6.0 KB  |  155 lines

  1. /* float.h */
  2. #ifndef _FLOAT_H___
  3. #define _FLOAT_H___
  4. /* Produced by enquire version 4.3, CWI, Amsterdam */
  5.  
  6.    /* Radix of exponent representation */
  7. #undef FLT_RADIX
  8. #define FLT_RADIX 2
  9.    /* Number of base-FLT_RADIX digits in the significand of a float */
  10. #undef FLT_MANT_DIG
  11. #define FLT_MANT_DIG 24
  12.    /* Number of decimal digits of precision in a float */
  13. #undef FLT_DIG
  14. #define FLT_DIG 6
  15.    /* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */
  16. #undef FLT_ROUNDS
  17. #define FLT_ROUNDS 1
  18.    /* Difference between 1.0 and the minimum float greater than 1.0 */
  19. #undef FLT_EPSILON
  20. #define FLT_EPSILON 1.19209290e-07F
  21.    /* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */
  22. #undef FLT_MIN_EXP
  23. #define FLT_MIN_EXP (-125)
  24.    /* Minimum normalised float */
  25. #undef FLT_MIN
  26. #define FLT_MIN 1.17549435e-38F
  27.    /* Minimum int x such that 10**x is a normalised float */
  28. #undef FLT_MIN_10_EXP
  29. #define FLT_MIN_10_EXP (-37)
  30.    /* Maximum int x such that FLT_RADIX**(x-1) is a representable float */
  31. #undef FLT_MAX_EXP
  32. #define FLT_MAX_EXP 128
  33.    /* Maximum float */
  34. #undef FLT_MAX
  35. #define FLT_MAX 3.40282347e+38F
  36.    /* Maximum int x such that 10**x is a representable float */
  37. #undef FLT_MAX_10_EXP
  38. #define FLT_MAX_10_EXP 38
  39.  
  40.    /* Number of base-FLT_RADIX digits in the significand of a double */
  41. #undef DBL_MANT_DIG
  42. #define DBL_MANT_DIG 53
  43.    /* Number of decimal digits of precision in a double */
  44. #undef DBL_DIG
  45. #define DBL_DIG 15
  46.    /* Difference between 1.0 and the minimum double greater than 1.0 */
  47. #undef DBL_EPSILON
  48. #define DBL_EPSILON 2.2204460492503131e-16
  49.  
  50. /* *** WARNING: Possibly bad output from printf above */
  51. /*     expected value around 2.2204460492503131e-16, bit pattern:
  52.     00111100 10110000 00000000 00000000 00000000 00000000 00000000 00000000 */
  53. /*     sscanf gave           2.2204460492503126e-16, bit pattern:
  54.     00111100 10101111 11111111 11111111 11111111 11111111 11111111 11111110 */
  55. /*     difference= 4.9303806576313232e-32 */
  56.  
  57.    /* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */
  58. #undef DBL_MIN_EXP
  59. #define DBL_MIN_EXP (-1021)
  60.    /* Minimum normalised double */
  61. #undef DBL_MIN
  62. #define DBL_MIN 2.2250738585072010e-308
  63.  
  64. /* *** WARNING: Possibly bad output from printf above */
  65. /*     expected value around 2.2250738585072010e-308, bit pattern:
  66.     00000000 00010000 00000000 00000000 00000000 00000000 00000000 00000000 */
  67. /*     sscanf gave           2.2250738585071970e-308, bit pattern:
  68.     00000000 00001111 11111111 11111111 11111111 11111111 11111111 11111000 */
  69. /*     difference= 3.9525251667299726e-323 */
  70.  
  71.    /* Minimum int x such that 10**x is a normalised double */
  72. #undef DBL_MIN_10_EXP
  73. #define DBL_MIN_10_EXP (-307)
  74.    /* Maximum int x such that FLT_RADIX**(x-1) is a representable double */
  75. #undef DBL_MAX_EXP
  76. #define DBL_MAX_EXP 1024
  77.    /* Maximum double */
  78. #undef DBL_MAX
  79. #define DBL_MAX 1.7976931348623168e+308
  80.  
  81. /* *** WARNING: Possibly bad output from printf above */
  82. /*     expected value around 1.7976931348623165e308, bit pattern:
  83.     01111111 11101111 11111111 11111111 11111111 11111111 11111111 11111111 */
  84. /*     sscanf gave           NaN, bit pattern:
  85.     01111111 11110000 00000000 00000000 00000000 00000000 00000000 00000101 */
  86. /*     difference= NaN */
  87.  
  88.    /* Maximum int x such that 10**x is a representable double */
  89. #undef DBL_MAX_10_EXP
  90. #define DBL_MAX_10_EXP 308
  91.  
  92.    /* Number of base-FLT_RADIX digits in the significand of a long double */
  93. #undef LDBL_MANT_DIG
  94. #define LDBL_MANT_DIG 53
  95.    /* Number of decimal digits of precision in a long double */
  96. #undef LDBL_DIG
  97. #define LDBL_DIG 15
  98.    /* Difference between 1.0 and the minimum long double greater than 1.0 */
  99. #undef LDBL_EPSILON
  100. #ifndef __LDBL_UNION__
  101. #define __LDBL_UNION__
  102. union __convert_long_double {
  103.   int __convert_long_double_i[4];
  104.   long double __convert_long_double_d;
  105. };
  106. #endif
  107. #define LDBL_EPSILON (__extension__ ((union __convert_long_double) {0x3cb00000, 0x0, 0x73f393a, 0x76a8ad4}).__convert_long_double_d)
  108.  
  109. /* *** WARNING: Possibly bad output from printf above */
  110. /*     expected value around 2.2204460492503131e-16, bit pattern:
  111.     00111100 10110000 00000000 00000000 00000000 00000000 00000000 00000000 */
  112. /*     sscanf gave           2.2204460492503126e-16, bit pattern:
  113.     00111100 10101111 11111111 11111111 11111111 11111111 11111111 11111110 */
  114. /*     difference= 4.9303806576313232e-32 */
  115.  
  116.    /* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */
  117. #undef LDBL_MIN_EXP
  118. #define LDBL_MIN_EXP (-1021)
  119.    /* Minimum normalised long double */
  120. #undef LDBL_MIN
  121. #define LDBL_MIN (__extension__ ((union __convert_long_double) {0x100000, 0x0, 0x76dd930, 0x73d718e}).__convert_long_double_d)
  122.  
  123. /* *** WARNING: Possibly bad output from printf above */
  124. /*     expected value around 2.2250738585072010e-308, bit pattern:
  125.     00000000 00010000 00000000 00000000 00000000 00000000 00000000 00000000 */
  126. /*     sscanf gave           2.2250738585071970e-308, bit pattern:
  127.     00000000 00001111 11111111 11111111 11111111 11111111 11111111 11111000 */
  128. /*     difference= 3.9525251667299726e-323 */
  129.  
  130.    /* Minimum int x such that 10**x is a normalised long double */
  131. #undef LDBL_MIN_10_EXP
  132. #define LDBL_MIN_10_EXP (-307)
  133.    /* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */
  134. #undef LDBL_MAX_EXP
  135. #define LDBL_MAX_EXP 1024
  136.    /* Maximum long double */
  137. #undef LDBL_MAX
  138. #define LDBL_MAX (__extension__ ((union __convert_long_double) {0x7fefffff, 0xffffffff, 0x76dd930, 0x73d718e}).__convert_long_double_d)
  139.  
  140. /* *** WARNING: Possibly bad output from printf above */
  141. /*     expected value around 1.7976931348623165e308, bit pattern:
  142.     01111111 11101111 11111111 11111111 11111111 11111111 11111111 11111111 */
  143. /*     sscanf gave           NaN, bit pattern:
  144.     01111111 11110000 00000000 00000000 00000000 00000000 00000000 00000101 */
  145. /*     difference= NaN */
  146.  
  147.    /* Maximum int x such that 10**x is a representable long double */
  148. #undef LDBL_MAX_10_EXP
  149. #define LDBL_MAX_10_EXP 308
  150.  
  151. #endif /*  _FLOAT_H___ */
  152.  
  153. /* For hints on dealing with the 6 problems above
  154.    see the section 'TROUBLESHOOTING' in the file ../gcc-2.3.3-amiga/enquire.c */
  155.