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 or 0

Indicates whether or not the result of an add operation is rounded off.
The meaning of this macro definition is as follows:

When result of add operation is rounded off: 1

When result of add operation is rounded down: 0

The rounding-off and rounding-down methods are implementation-defined.

Constant
(macro)

 

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.

LDBL_MAX

1.7976931348623158e
+308

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

FLT_MAX_EXP

127

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

DBL_MAX_EXP

1023

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

LDBL_MAX_EXP

1023

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

FLT_MAX_10_
EXP

38

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

DBL_MAX_10_
EXP

308

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

LDBL_MAX_10_
EXP

308

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

FLT_MIN

1.175494351e38F

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

149

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

DBL_MIN_EXP

1074

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

LDBL_MIN_EXP

1074

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

Constant
(macro)

FLT_MIN_10_EXP

44

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

DBL_MIN_10_
EXP

323

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

LDBL_MIN_10_
EXP

323

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

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.

FLT_EXP_DIG

8

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

DBL_EXP_DIG

11

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

LDBL_EXP_DIG

11

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

FLT_POS_EPS

5.9604648328104311e8F

Indicates the minimum floating-point value x for which 1.0 + x 1.0 in float type.

DBL_POS_EPS

1.1102230246251567e16

Indicates the minimum floating-point value x for which 1.0 + x 1.0 in double type.

LDBL_POS_EPS

1.1102230246251567e16

Indicates the minimum floating-point value x for which 1.0 + x 1.0 in long double type.

FLT_NEG_EPS

2.9802324164052156e8F

Indicates the minimum floating-point value x for which 1.0 x 1.0 in float type.

DBL_NEG_EPS

5.5511151231257834e17

Indicates the minimum floating-point value x for which 1.0 x 1.0 in double type

LDBL_NEG_EPS

5.5511151231257834e17

Indicates the minimum floating-point value x for which 1.0 x 1.0 in long double type.

Constant
(macro)

FLT_POS_EPS_
EXP

23

Indicates the minimum integer n for which 1.0 + (radix)n 1.0 in float type.

DBL_POS_EPS_
EXP

52

Indicates the minimum integer n for which 1.0 +(radix)n 1.0 in double type.

LDBL_POS_EPS_EXP

52

Indicates the minimum integer n for which 1.0 + (radix)n 1.0 in long double type.

FLT_NEG_EPS_
EXP

24

Indicates the minimum integer n for which 1.0 (radix)n 1.0 in float type.

DBL_NEG_EPS_
EXP

53

Indicates the minimum integer n for which 1.0 (radix)n 1.0 in double type.

LDBL_NEG_EPS_EXP

53

Indicates the minimum integer n for which 1.0 (radix)n 1.0 in long double type.

DECIMAL_DIG

10

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

FLT_EPSILON

1E5

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

DBL_EPSILON

1E9

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

LDBL_EPSILON

1E9

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