`<float.h>`

Include the standard header ** <float.h>**
to determine various properties of floating-point type representations.
The standard header

`<float.h>`

is available even in a
freestanding implementation.You can test the values of any of the integer macros except
`FLT_ROUNDS`

in an
*if* directive.
(The macros expand to
*#if* expressions.)
All other macros defined in this header expand to
floating-point constant expressions.

Some target environments can change the rounding and error-reporting properties of floating-point type representations while the program is running.

#defineFLT_RADIX<#if expression >= 2>#defineFLT_ROUNDS<integer rvalue>#defineFLT_EVAL_METHOD<#if expression>[added with C99]#defineDECIMAL_DIG<#if expression> >= 10[added with C99]#defineDBL_DIG<#if expression >= 10>#defineDBL_EPSILON<double constant <= 10^(-9)>#defineDBL_MANT_DIG<#if expression>#defineDBL_MAX<double constant >= 10^37>#defineDBL_MAX_10_EXP<#if expression >= 37>#defineDBL_MAX_EXP<#if expression>#defineDBL_MIN<double constant <= 10^(-37)>#defineDBL_MIN_10_EXP<#if expression <= -37>#defineDBL_MIN_EXP<#if expression>#defineFLT_DIG<#if expression >= 6>#defineFLT_EPSILON<float constant <= 10^(-5)>#defineFLT_MANT_DIG<#if expression>#defineFLT_MAX<float constant >= 10^37>#defineFLT_MAX_10_EXP<#if expression >= 37>#defineFLT_MAX_EXP<#if expression>#defineFLT_MIN<float constant <= 10^(-37)>#defineFLT_MIN_10_EXP<#if expression <= -37>#defineFLT_MIN_EXP<#if expression>#defineLDBL_DIG<#if expression >= 10>#defineLDBL_EPSILON<long double constant <= 10^(-9)>#defineLDBL_MANT_DIG<#if expression>#defineLDBL_MAX<long double constant >= 10^37>#defineLDBL_MAX_10_EXP<#if expression >= 37>#defineLDBL_MAX_EXP<#if expression>#defineLDBL_MIN<long double constant <= 10^(-37)>#defineLDBL_MIN_10_EXP<#if expression <= -37>#defineLDBL_MIN_EXP<#if expression>

`DBL_DIG`

#defineDBL_DIG<#if expression >= 10>

The macro yields the precision in decimal digits for
type *double.*

`DBL_EPSILON`

#defineDBL_EPSILON<double constant <= 10^(-9)>

The macro yields the smallest *X* of type *double*
such that 1.0 + *X* != 1.0.

`DBL_MANT_DIG`

#defineDBL_MANT_DIG<#if expression>

The macro yields the number of mantissa digits, base
`FLT_RADIX`

,
for type *double.*

`DBL_MAX`

#defineDBL_MAX<double constant >= 10^37>

The macro yields the largest finite representable value
of type *double.*

`DBL_MAX_10_EXP`

#defineDBL_MAX_10_EXP<#if expression >= 37>

The macro yields the maximum integer *X,* such that
10^*X* is a finite representable value of type *double.*

`DBL_MAX_EXP`

#defineDBL_MAX_EXP<#if expression>

The macro yields the maximum integer *X,* such that
`FLT_RADIX`

^(*X* - 1)
is a finite representable value of type *double.*

`DBL_MIN`

#defineDBL_MIN<double constant <= 10^(-37)>

The macro yields the smallest normalized, finite representable
value of type *double.*

`DBL_MIN_10_EXP`

#defineDBL_MIN_10_EXP<#if expression <= -37>

The macro yields the minimum integer *X* such that
10^*X* is a normalized, finite representable value
of type *double.*

`DBL_MIN_EXP`

#defineDBL_MIN_EXP<#if expression>

The macro yields the minimum integer *X* such that
`FLT_RADIX`

^(*X* - 1)
is a normalized, finite representable value of type *double.*

`DECIMAL_DIG`

#defineDECIMAL_DIG<#if expression >= 10>[added with C99]

The macro yields the minimum number of decimal digits needed to represent
all the significant digits for type *long double.*

`FLT_DIG`

#defineFLT_DIG<#if expression >= 6>

The macro yields the precision in decimal digits
for type *float.*

`FLT_EPSILON`

#defineFLT_EPSILON<float constant <= 10^(-5)>

The macro yields the smallest *X* of type *float*
such that 1.0 + *X* != 1.0.

`FLT_EVAL_METHOD`

#defineFLT_EVAL_METHOD<#if expression>[added with C99]

The macro yields a value that describes the evaluation mode for floating-point operations. The values are:

- -1 if the mode is indeterminate
- 0 if no promotions occur
- 1 if
*float*values promote to*double* - 2 if
*float*and*double*values promote to*long double*

An implementation can define additional negative values for this macro.

`FLT_MANT_DIG`

#defineFLT_MANT_DIG<#if expression>

The macro yields the number of mantissa digits, base
`FLT_RADIX`

,
for type *float.*

`FLT_MAX`

#defineFLT_MAX<float constant >= 10^37>

The macro yields the largest finite representable value
of type *float.*

`FLT_MAX_10_EXP`

#defineFLT_MAX_10_EXP<#if expression >= 37>

The macro yields the maximum integer *X,* such that 10^*X*
is a finite representable value of type *float.*

`FLT_MAX_EXP`

#defineFLT_MAX_EXP<#if expression>

The macro yields the maximum integer *X,* such that
`FLT_RADIX`

^(*X* - 1)
is a finite representable value of type *float.*

`FLT_MIN`

#defineFLT_MIN<float constant <= 10^(-37)>

The macro yields the smallest normalized, finite representable
value of type *float.*

`FLT_MIN_10_EXP`

#defineFLT_MIN_10_EXP<#if expression <= -37>

The macro yields the minimum integer *X,* such that 10^*X*
is a normalized, finite representable value of type *float.*

`FLT_MIN_EXP`

#defineFLT_MIN_EXP<#if expression>

The macro yields the minimum integer *X,* such that
`FLT_RADIX`

^(*X* - 1)
is a normalized, finite representable value of type *float.*

`FLT_RADIX`

#defineFLT_RADIX<#if expression >= 2>

The macro yields the radix of all floating-point representations.

`FLT_ROUNDS`

#defineFLT_ROUNDS<integer rvalue>

The macro yields a value that describes the current rounding mode for floating-point operations. Note that the target environment can change the rounding mode while the program executes. How it does so, however, is not specified. The values are:

- -1 if the mode is indeterminate
- 0 if rounding is toward zero
- 1 if rounding is to nearest representable value
- 2 if rounding is toward positive infinity
- 3 if rounding is toward negative infinity

An implementation can define additional values for this macro.

`LDBL_DIG`

#defineLDBL_DIG<#if expression >= 10>

The macro yields the precision in decimal digits for type *long
double.*

`LDBL_EPSILON`

#defineLDBL_EPSILON<long double constant <= 10^(-9)>

The macro yields the smallest *X* of type *long double*
such that 1.0 + *X* != 1.0.

`LDBL_MANT_DIG`

#defineLDBL_MANT_DIG<#if expression>

The macro yields the number of mantissa digits, base
`FLT_RADIX`

,
for type *long double.*

`LDBL_MAX`

#defineLDBL_MAX<long double constant >= 10^37>

The macro yields the largest finite representable value of type
*long double.*

`LDBL_MAX_10_EXP`

#defineLDBL_MAX_10_EXP<#if expression >= 37>

The macro yields the maximum integer *X,* such that
10^*X* is a finite representable value of type *long double.*

`LDBL_MAX_EXP`

#defineLDBL_MAX_EXP<#if expression>

The macro yields the maximum integer *X,* such that
`FLT_RADIX`

^(*X* - 1)
is a finite representable value of type *long double.*

`LDBL_MIN`

#defineLDBL_MIN<long double constant <= 10^(-37)>

The macro yields the smallest normalized, finite representable
value of type *long double.*

`LDBL_MIN_10_EXP`

#defineLDBL_MIN_10_EXP<#if expression <= -37>

The macro yields the minimum integer *X,* such that
10^*X* is a normalized, finite representable value
of type *long double.*

`LDBL_MIN_EXP`

#defineLDBL_MIN_EXP<#if expression>

The macro yields the minimum integer *X,* such that
`FLT_RADIX`

^(*X* - 1)
is a normalized, finite representable value of type *long double.*

See also the
**Table of Contents** and the
**Index**.

*
Copyright © 1992-2006
by P.J. Plauger and Jim Brodie. All rights reserved.*

Last modified: 2013-12-21