7.4.4 <float.h>

Defines various limits relating to the internal representation of floating-point numbers.
The following macro names are all implementation-defined.

Type

Definition Name

Definition Value

Description

Constant

(macro)

FLT_RADIX

2

Indicates the radix in exponent representation.

FLT_ROUNDS

1

Indicates whether or not the results of addition are rounded off.

1 means that rounding of the results of operation is enabled.

FLT_MAX

3.4028235677973364e+38F

Indicates the maximum value that can be represented as a float type floating-point value.

DBL_MAX

1.7976931348623158e+308

Indicates the maximum value that can be represented as a double type floating-point value.

Constant

(macro)

LDBL_MAX

1.7976931348623158e+308

Indicates the maximum value that can be represented as a long double type floating-point value.

FLT_MAX_EXP

128

Using powers of the radix two to represent the range of float type floating-point numbers, FLT_MAX_EXP indicates the maximum value of the exponent plus 1.

DBL_MAX_EXP

1024

Using powers of the radix two to represent the range of double type floating-point numbers, DBL_MAX_EXP indicates the maximum value of the exponent plus 1.

LDBL_MAX_EXP

1024

Using powers of the radix two to represent the range of long double type floating-point numbers, LDBL_MAX_EXP indicates the maximum value of the exponent plus 1.

FLT_MAX_10_EXP

38

Using powers of 10 to represent the range of float type floating point positive numbers, FLT_MAX_10_EXP indicates the exponent of the maximum integer.

DBL_MAX_10_EXP

308

Using powers of 10 to represent the range of double type floating point positive numbers, DBL_MAX_10_EXP indicates the exponent of the maximum integer.

LDBL_MAX_10_EXP

308

Using powers of 10 to represent the range of long double type floating point positive numbers, LDBL_MAX_10_EXP indicates the exponent of the maximum integer.

FLT_MIN

1.175494351e−38F

Indicates the minimum positive value that can be represented as a float type floating-point value.

DBL_MIN

2.2250738585072014e−308

Indicates the minimum positive value that can be represented as a double type floating-point value.

LDBL_MIN

2.2250738585072014e−308

Indicates the minimum positive value that can be represented as a long double type floating-point value.

FLT_MIN_EXP

−125

Using powers of the radix two to represent the range of float type floating-point numbers, FLT_MIN_EXP indicates the minimum value of the exponent plus 1.

DBL_MIN_EXP

−1021

Using powers of the radix two to represent the range of double type floating-point numbers, DBL_MIN_EXP indicates the minimum value of the exponent plus 1.

LDBL_MIN_EXP

−1021

Using powers of the radix two to represent the range of long double type floating-point numbers, LDBL_MIN_EXP indicates the minimum value of the exponent plus 1.

Constant

(macro)

FLT_MIN_10_EXP

−37

Using powers of 10 to represent the range of float type floating point positive numbers, FLT_MIN_10_EXP indicates the exponent of the minimum integer.

DBL_MIN_10_EXP

−307

Using powers of 10 to represent the range of double type floating point positive numbers, DBL_MIN_10_EXP indicates the exponent of the minimum integer.

LDBL_MIN_10_EXP

−307

Using powers of 10 to represent the range of long double type floating point positive numbers, LDBL_MIN_10_EXP indicates the exponent of the minimum integer.

FLT_DIG

6

Indicates the maximum number of digits in float type floating-point value decimal-precision.

DBL_DIG

15

Indicates the maximum number of digits in double type floating-point value decimal-precision.

LDBL_DIG

15

Indicates the maximum number of digits in long double type floating-point value decimal-precision.

FLT_MANT_DIG

24

Indicates the maximum number of mantissa digits when a float type floating-point value is represented in the radix.

DBL_MANT_DIG

53

Indicates the maximum number of mantissa digits when a double type floating-point value is represented in the radix.

LDBL_MANT_DIG

53

Indicates the maximum number of mantissa digits when a long double type floating-point value is represented in the radix.

DECIMAL_DIG

17

Indicates the maximum number of digits of a floating-point value represented in decimal precision.

FLT_EPSILON

1.1920928955078125e-07

Indicates the difference between 1 and the minimum value greater than 1 that can be represented in float type.

DBL_EPSILON

2.2204460492503131e-16

Indicates the difference between 1 and the minimum value greater than 1 that can be represented in double type.

LDBL_EPSILON

2.2204460492503131e-16

Indicates the difference between 1 and the minimum value greater than 1 that can be represented in long double type.