在线文档教程
C++
应用 | Utilities

FLT_ROUNDS

FLT[医]子弹

Defined in header
#define FLT_ROUNDS /* implementation defined */(since C++11)

指定浮点算术运算的当前舍入方向.

ValueExplanation
-1the default rounding direction is not known
0toward zero, FE_TOWARDZERO
1to nearest, FE_TONEAREST
2towards positive infinity, FE_UPWARD
3towards negative infinity, FE_DOWNWARD
other valuesimplementation-defined behavior

注记

舍入模式可以用std::fesetroundFLT_ROUNDS反映了这种变化。

FLT的可能值[医]的可能值匹配。std::float_round_style,由std::numeric_limits::round_style...

另见

float_round_styleindicates floating-point rounding modes (enum)
fegetroundfesetround (C++11)(C++11)gets or sets rounding direction (function)

C.FLT文件[医]子弹

© cppreference.com

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

http://en.cppreference.com/w/cpp/type/crits/flt[医]子弹