std::float_round_style

定义于头文件 <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 向负无穷大舍入

参阅

[静态]
鉴别类型所用的舍入模式
(公开静态成员常量)
浮点舍入方向
(宏常量)

版本历史

  • (当前 | 先前 2017年6月9日 (五) 23:30Fruderica讨论 | 贡献. . (1,096字节) (-869). . (撤销)
  • 当前 | 先前 2013年7月2日 (二) 11:44P12bot讨论 | 贡献 . . (1,965字节) (-127). . (Use {{lc}}. Update links. Various fixes.) (撤销)
  • 当前 | 先前 2012年11月2日 (五) 15:28P12bot讨论 | 贡献 . . (2,092字节) (+401). . (r2.7.3) (机器人添加:de, en, es, fr, it, ja, pt, ru) (撤销)
  • 当前 | 先前 2012年10月27日 (六) 11:51P12讨论 | 贡献 . . (1,691字节) (0). . (1个修订: Translate from the English version) (撤销)
  • 当前 | 先前 2012年10月26日 (五) 06:00TranslationBot讨论 | 贡献. . (1,691字节) (-55). . (Translated from the English version using Google Translate) (撤销)
  • 当前 | 先前 2012年10月26日 (五) 03:34P12讨论 | 贡献 . . (1,746字节) (0). . (1个修订: Translate from the English version) (撤销)
  • 当前 | 先前) 2012年10月25日 (四) 12:00TranslationBot讨论 | 贡献. . (1,746字节) (+1,746). . (Translated from the English version using Google Translate)