C++ in a Nutshell
| DBL_DIG macro | Decimal precision |
| int DBL_DIG |
Number of significant decimal digits that can be stored in a double . The value is always at least 10.
| DBL_EPSILON macro | Limit of accuracy |
| double DBL_EPSILON |
The difference between 1 and the smallest value greater than 1 that can be stored in a double . The value is always less than or equal to 10 -9 .
| DBL_MANT_DIG macro | Significand precision |
| int DBL_MANT_DIG |
Number of FLT_RADIX digits in the significand of a double .
| DBL_MAX macro | Maximum finite value |
| double DBL_MAX |
Maximum finite double value. The value is always at least 10 37 .
| DBL_MAX_10_EXP macro | Maximum decimal exponent |
| int DBL_MAX_10_EXP |
Maximum decimal exponent for a finite double . The value is always at least 37.
| DBL_MAX_EXP macro | Maximum exponent |
| int DBL_MAX_EXP |
Maximum exponent of a FLT_RADIX base for a finite double .
| DBL_MIN macro | Minimum positive value |
| double DBL_MIN |
Minimum normalized, positive double value. The value is always less than or equal to 10 -37 .
| DBL_MIN_10_EXP macro | Minimum decimal exponent |
| int DBL_MIN_10_EXP |
Minimum negative decimal exponent for a normalized double . The value is always less than or equal to -37.
| DBL_MIN_EXP macro | Minimum exponent |
| int DBL_MIN_EXP |
Minimum negative exponent of a FLT_RADIX base for a normalized double .
| FLT_DIG macro | Decimal precision |
| int FLT_DIG |
Number of significant decimal digits that can be stored in a float . The value is always at least 6.
| FLT_EPSILON macro | Limit of accuracy |
| float FLT_EPSILON |
The difference between 1 and the smallest value greater than 1 that can be stored in a float . The value is always less than or equal to 10 -5 .
| FLT_MANT_DIG macro | Significand precision |
| int FLT_MANT_DIG |
Number of FLT_RADIX digits in the significand of a float .
| FLT_MAX macro | Maximum finite value |
| float FLT_MAX |
Maximum finite float value. The value is always at least 10 37 .
| FLT_MAX_10_EXP macro | Maximum decimal exponent |
| int FLT_MAX_10_EXP |
Maximum decimal exponent for a finite float . The value is always at least 37.
| FLT_MAX_EXP macro | Maximum exponent |
| int FLT_MAX_EXP |
Maximum exponent of a FLT_RADIX base for a finite float .
| FLT_MIN macro | Minimum positive value |
| float FLT_MIN |
Minimum normalized, positive float value. The value is always less than or equal to 10 -37 .
| FLT_MIN_10_EXP macro | Minimum decimal exponent |
| int FLT_MIN_10_EXP |
Minimum negative decimal exponent for a normalized float . The value is always less than or equal to -37.
| FLT_MIN_EXP macro | Minimum exponent |
| int FLT_MIN_EXP |
Minimum negative exponent of a FLT_RADIX base for a normalized float .
| FLT_RADIX macro | Implementation base |
| int FLT_RADIX |
The FLT_RADIX macro is an integer constant that specifies the radix, or base, for the floating-point implementation. For example, IEC 60559 (IEEE 754) has a FLT_RADIX of 2.
| FLT_ROUNDS macro | Rounding mode |
| int FLT_ROUNDS |
The FLT_ROUNDS macro specifies how the implementation rounds floating-point numbers . Table 13-2 lists the possible values as defined in the C++ standard. An implementation can define additional values with other meanings.
Table 13-2. Floating-point rounding mode
| Value | Description |
|---|---|
| -1 | Indeterminable |
|
| Rounds toward 0 |
| 1 | Rounds to nearest |
| 2 | Rounds up (toward positive infinity) |
| 3 | Rounds down (toward negative infinity) |
| LDBL_DIG macro | Decimal precision |
| int LDBL_DIG |
Number of significant decimal digits that can be stored in a long double .The value is always at least 10.
| LDBL_EPSILON macro | Limit of accuracy |
| long double LDBL_EPSILON |
The difference between 1 and the smallest value greater than 1 that can be stored in a long double . The value is always less than or equal to 10 -9 .
| LDBL_MANT_DIG macro | Significand precision |
| int LDBL_MANT_DIG |
Number of FLT_RADIX digits in the significand of a long double .
| LDBL_MAX macro | Maximum finite value |
| long double LDBL_MAX |
Maximum finite long double value. The value is always at least 10 37 .
| LDBL_MAX_10_EXP macro | Maximum decimal exponent |
| int LDBL_MAX_10_EXP |
Maximum decimal exponent for a finite long double . The value is always at least 37.
| LDBL_MAX_EXP macro | Maximum exponent |
| int LDBL_MAX_EXP |
Maximum exponent of a FLT_RADIX base for a finite double .
| LDBL_MIN macro | Minimum positive value |
| long double LDBL_MIN |
Minimum normalized, positive long double value. The value is always less than or equal to 10 -37 .
| LDBL_MIN_10_EXP macro | Minimum decimal exponent |
| int LDBL_MIN_10_EXP |
Minimum negative decimal exponent for a normalized long double . The value is always less than or equal to -37.
| LDBL_MIN_EXP macro | Minimum exponent |
| int LDBL_MIN_EXP |
Minimum negative exponent of a FLT_RADIX base for a normalized long double .