Namespaces
Variants
Views
Actions

std::float_round_style

From cppreference.com
< cpp‎ | types‎ | numeric limits
Revision as of 15:27, 2 November 2012 by P12bot (Talk | contribs)

 
 
 
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
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
Type properties
(C++11)
(C++11)
(C++11)
(C++14)
Supported operations
Relationships and property queries
(C++11)
(C++11)
(C++11)
(C++11)
Type modifications
(C++11)(C++11)(C++11)
Type transformations
(C++11)
(C++11)
(C++11)
Type trait constants
 
 

Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <limits>
</td>

<td></td> <td></td> <tr class="t-dcl ">

<td class="t-dcl-nopad">
enum float_round_style {

    round_indeterminate       = -1,
    round_toward_zero         = 0,
    round_to_nearest          = 1,
    round_toward_infinity     = 2,
    round_toward_neg_infinity = 3

};
</td>

<td class="t-dcl-nopad"> </td> <td class="t-dcl-nopad"> </td> </tr> Template:ddcl list end

Enumeration constants of type std::float_round_style indicate the rounding style used by floating-point arithmetics whenever a result of an expression is stored in an object of a floating-point type. The values are:

Enumeration constants

Name Definition
std::round_indeterminate Rounding style cannot be determined
std::round_toward_zero Rounding toward zero
std::round_to_nearest Rounding toward nearest representable value
std::round_toward_infinity Rounding toward positive infinity
std::round_toward_neg_infinity Rounding toward negative infinity

See also

Template:cpp/numeric/fenv/dcl list FE round
[static]
identifies the rounding style used by the type
(public static member constant) [edit]