首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::float_round_style

Defined in header <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当表达式的结果存储在浮点类型的对象中时,指示浮点算法使用的舍入样式。这些价值是:

枚举常数

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)

代码语言:txt
复制
 © cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券