std::float_round_style
STD:浮动[医]圆[医]风格
Defined in header | | |
---|---|---|
enum float_round_style { round_indeterminate = -1, round_toward_zero = 0, round_to_nearest = 1, round_toward_infinity = 2, round_toward_neg_infinity = 3 }; | | |
类型枚举常数std::float_round_style
当表达式的结果存储在浮点类型的对象中时,指示浮点算法使用的舍入样式。这些价值是:
枚举常数
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 |
另见
round_style static | identifies the rounding style used by the type (public static member constant) |
---|---|
FE_DOWNWARDFE_TONEARESTFE_TOWARDZEROFE_UPWARD (C++11) | floating-point rounding direction (macro constant) |
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。
http://en.cppreference.com/w/cpp/type/NUMERIC[医]限制/浮动[医]圆[医]风格