The header file float.h defines various macros related to the floating-point types float, double, and long double, specifying their ranges and precision.

  1. FLT_ROUNDS
    This macro indicates the rounding direction used in floating-point addition. Its possible values are:
    • -1: Undetermined.
    • 0: Round towards zero.
    • 1: Round to the nearest integer.
    • 2: Round towards positive infinity.
    • 3: Round towards negative infinity.
  2. FLT_RADIX
    This macro represents the base of the exponent in scientific notation, which is generally 2.
  3. Maximum Values of Floating-Point Types
    • FLT_MAX
    • DBL_MAX
    • LDBL_MAX
  4. Minimum Positive Values of Floating-Point Types
    • FLT_MIN
    • DBL_MIN
    • LDBL_MIN
  5. Smallest Difference Representable Between Two Floating-Point Values (Machine Precision)
    • FLT_EPSILON
    • DBL_EPSILON
    • LDBL_EPSILON
  6. DECIMAL_DIG
    This macro indicates the number of decimal digits that can be represented accurately.
  7. FLT_EVAL_METHOD
    This macro specifies how floating-point expressions are evaluated regarding type conversion. Its possible values are:
    • -1: Undetermined.
    • 0: Operations are performed in the current type.
    • 1: Operations involving float and double use the range and precision of double.
    • 2: All floating-point operations use the range and precision of long double.
  8. Number of Bits in the Mantissa
    • FLT_MANT_DIG
    • DBL_MANT_DIG
    • LDBL_MANT_DIG
  9. Number of Decimal Digits in the Exponent
    • FLT_DIG
    • DBL_DIG
    • LDBL_DIG
  10. Minimum Negative Exponent in Scientific Notation
    • FLT_MIN_EXP
    • DBL_MIN_EXP
    • LDBL_MIN_EXP
  11. Minimum Decimal Exponent in Scientific Notation (Negative)
    • FLT_MIN_10_EXP
    • DBL_MIN_10_EXP
    • LDBL_MIN_10_EXP
  12. Maximum Exponent in Scientific Notation
    • FLT_MAX_EXP
    • DBL_MAX_EXP
    • LDBL_MAX_EXP
  13. Maximum Decimal Exponent in Scientific Notation
    • FLT_MAX_10_EXP
    • DBL_MAX_10_EXP
    • LDBL_MAX_10_EXP