std::float_round_style
来自 zh.cppreference.net
| 定义于头文件 <limits>
|
||
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 的枚举常量表示当表达式结果存储到浮点类型对象时,浮点算术所使用的舍入模式。
枚举常量
| 枚举值 | 含义 |
| std::round_indeterminate | 无法确定舍入方式 |
| std::round_toward_zero | 向零舍入 |
| std::round_to_nearest | 向最接近的可表示值舍入 |
| std::round_toward_infinity | 向正无穷舍入 |
| std::round_toward_neg_infinity | 向负无穷舍入 |
参见
|
[static]
|
标识该类型使用的舍入风格
(公开静态成员常量) |
|
浮点数舍入方向
(宏常量) |