This header file contains a set of various platform-dependent constants (related to floating point values) proposed in ANSI C, which allow making more portable programs:
Name | Type | Value | Meaning |
FLT_RADIX | unsigned int | 10 | The base used for representing the exponent |
FLT_ROUNDS | unsigned int | 1 | Option for rounding floating point numbers during the addition |
FLT_NORMALIZE | unsigned int | 1 | Indicates that floating point numbers should always be normalized |
FLT_DIG DBL_DIG LDBL_DIG | unsigned int | 16 | Number of significant digits in a floating point number |
FLT_MANT_DIG DBL_MANT_DIG LDBL_MANT_DIG | unsigned int | 16 | Number of FLT_RADIX digits in the mantissa |
FLT_MANT_BITS DBL_MANT_BITS LDBL_MANT_BITS | unsigned int | 64 | Number of bits used for the mantissa |
FLT_EPSILON DBL_EPSILON LDBL_EPSILON | float double long double | 1e-15 | The smallest x for which is 1.0+x != 1.0 |
FLT_MAX DBL_MAX LDBL_MAX | float double long double | 9.999999999999999e999 | The maximal floating point value (see notes about FLT_MAX_EXP) |
FLT_MIN DBL_MIN LDBL_MIN | float double long double | 1e-999 | The minimal floating point value (see notes about FLT_MIN_EXP) |
FLT_MAX_EXP DBL_MAX_EXP LDBL_MAX_EXP | int | 999 | The maximal exponent of a floating point value expressed in base FLT_RADIX; greater exponents are principally possible (up to 16383), but not supported in all math functions |
FLT_MAX_2_EXP DBL_MAX_2_EXP LDBL_MAX_2_EXP | int | 3321 | The maximal exponent of a floating point value expressed in base 2 (see notes about FLT_MAX_EXP) |
FLT_MAX_10_EXP DBL_MAX_10_EXP LDBL_MAX_10_EXP | int | 999 | The maximal exponent of a floating point value expressed in base 10 (see notes about FLT_MAX_EXP) |
FLT_MIN_EXP DBL_MIN_EXP LDBL_MIN_EXP | int | -999 | The maximal exponent of a floating point value expressed in base FLT_RADIX; smaller exponents are principally possible (up to -16383), but not supported in all math functions |
FLT_MIN_2_EXP DBL_MIN_2_EXP LDBL_MIN_2_EXP | int | -3318 | The minimal exponent of a floating point value expressed in base 2 (see notes about FLT_MIN_EXP) |
FLT_MIN_10_EXP DBL_MIN_10_EXP LDBL_MIN_10_EXP | int | -999 | The minimal exponent of a floating point value expressed in base 10 (see notes about FLT_MIN_EXP) |