Namespaces
Variants
Views
Actions

FLT_ROUNDS

From cppreference.com
< cpp‎ | types‎ | climits
 
 
Utilities library
Language support
Type support (basic types, RTTI)
Library feature-test macros (C++20)
Dynamic memory management
Program utilities
Coroutine support (C++20)
Variadic functions
Debugging support
(C++26)
Three-way comparison
(C++20)
(C++20)(C++20)(C++20)
(C++20)(C++20)(C++20)
General utilities
Date and time
Function objects
Formatting library (C++20)
(C++11)
Relational operators (deprecated in C++20)
Integer comparison functions
(C++20)(C++20)(C++20)   
(C++20)
Swap and type operations
(C++14)
(C++11)
(C++11)
(C++11)
(C++17)
Common vocabulary types
(C++11)
(C++17)
(C++17)
(C++17)
(C++11)
(C++17)
(C++23)
Elementary string conversions
(C++17)
(C++17)

 
 
 
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 as FE_TOWARDZERO
1 to nearest; same meaning as FE_TONEAREST
2 towards positive infinity; same meaning as FE_UPWARD
3 towards negative infinity; same meaning as 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]
(C++11)(C++11)
gets or sets rounding direction
(function) [edit]
floating-point rounding direction
(macro constant) [edit]
C documentation for FLT_ROUNDS