< cpp‎ | types‎ | climits
Revision as of 14:18, 23 June 2014 by Cubbi (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Type support
Basic types
Fundamental types
Fixed width integer types (C++11)
Numeric limits
C numeric limits interface
Runtime type information
Type traits
Primary type categories
Type properties
Supported operations
Relationships and property queries
Type modifications
Type transformations
Type trait constants
Defined in header <cfloat>
#define FLT_ROUNDS /* implementation defined */
(since C++11)

Specifies the current rounding direction of floating-point arithmetic operations.

Value Explanation
-1 the default rounding direction is not known
0 toward zero, FE_TOWARDZERO
1 to nearest, FE_TONEAREST
2 towards positive infinity, FE_UPWARD
3 towards negative infinity, FE_DOWNWARD
other values implementation-defined behavior

[edit] Notes

The rounding mode can be changed with std::fesetround and FLT_ROUNDS reflects that change.

The possible values of FLT_ROUNDS match the possible values of std::float_round_style, returned by std::numeric_limits::round_style.

[edit] See also

indicates floating-point rounding modes
(enum) [edit]
gets or sets rounding direction
(function) [edit]
C documentation for FLT_ROUNDS