std:: float_round_style
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Basic types | |||||||||||||||||||||
| Fixed width integer types (C++11) | |||||||||||||||||||||
| Fixed width floating-point types (C++23) | |||||||||||||||||||||
|
|||||||||||||||||||||
| Numeric limits | |||||||||||||||||||||
| C numeric limits interface | |||||||||||||||||||||
| Runtime type information | |||||||||||||||||||||
|
|||||||||||||||||||||
| Static constants | ||||
|
(C++11)
|
||||
| Static member functions | ||||
|
(C++11)
|
||||
| Helper types | ||||
|
float_round_style
|
||||
|
定义于头文件
<limits>
|
||
|
enum
float_round_style
{
round_indeterminate
=
-
1
,
|
||
类型为
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]
|
标识该类型使用的舍入风格
(公开静态成员常量) |
|
浮点数舍入方向
(宏常量) |