Export (0) Print
Expand All

float_round_style

The enumeration describes the various methods that an implementation can choose for rounding a floating-point value to an integer value.

enum float_round_style { 
   round_indeterminate = -1, 
   round_toward_zero = 0, 
   round_to_nearest = 1, 
   round_toward_infinity = 2, 
   round_toward_neg_infinity = 3 
   };

The enumeration returns:

  • round_indeterminate if the rounding method cannot be determined.

  • round_toward_zero if the round toward zero.

  • round_to_nearest if the round to nearest integer.

  • round_toward_infinity if the round away from zero.

  • round_toward_neg_infinity if the round to more negative integer.

See numeric_limits::round_style for an example in which the values of this enumeration may be accessed.

Header: <limits>

Namespace: std

Show:
© 2014 Microsoft