|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Basic types | |||||||||||||||||||||
| Fixed width integer types(C++11) | |||||||||||||||||||||
| Fixed width floating-point types(C++23) | |||||||||||||||||||||
| |||||||||||||||||||||
| Numeric limits | |||||||||||||||||||||
| C numeric limits interface | |||||||||||||||||||||
| Runtime type information | |||||||||||||||||||||
| |||||||||||||||||||||
FLT_ROUNDS | ||||
(C++11) |
Defined in header <cfloat> | ||
#define FLT_ROUNDS /* implementation defined */ | ||
Specifies the current rounding direction of floating-point arithmetic operations.
| Value | Explanation |
-1 | the default rounding direction is not known |
0 | toward zero; same meaning asFE_TOWARDZERO |
1 | to nearest; same meaning asFE_TONEAREST |
2 | towards positive infinity; same meaning asFE_UPWARD |
3 | towards negative infinity; same meaning asFE_DOWNWARD |
| other values | implementation-defined behavior |
The rounding mode can be changed withstd::fesetround andFLT_ROUNDS reflects that change.
The possible values of FLT_ROUNDS match the possible values ofstd::float_round_style, returned bystd::numeric_limits::round_style.
| indicates floating-point rounding modes (enum)[edit] | |
(C++11)(C++11) | gets or sets rounding direction (function)[edit] |
| floating-point rounding direction (macro constant)[edit] | |
C documentation forFLT_ROUNDS | |