C++官方参考链接:https://cplusplus.com/reference/cfenv/FE_TOWARDZERO/
宏
FE_TOWARDZERO
int
向零舍入方向模式
这个宏展开为int类型的值,标识函数fegetround和fesetround的向零舍入方向模式。
x toward zero舍入选择在大小上不大于x的最接近的值。
可能的舍入方向模式有:
macro value(宏值) | description(描述) |
---|---|
FE_DOWNWARD | Round downward.(向下舍入。) |
FE_TONEAREST | Round to nearest.(向最近舍入。) |
FE_TOWARDZERO | Round toward zero.(向零舍入。) |
FE_UPWARD | Round upward.(向上舍入。) |
另请参阅
FE_DOWNWARD
Downward rounding direction mode (macro) (向下舍入方向模式(宏))
FE_TONEAREST
To-nearest rounding direction mode (macro) (向最近舍入方向模式(宏))
FE_UPWARD
Upward rounding direction mode (macro) (向上舍入方向模式(宏))
fegetround
Get rounding direction mode (function) (获取舍入方向模式(函数))
fesetround
Set rounding direction mode (function) (设置舍入方向模式(函数))
作者:探索