FLT_ROUNDS

FLT_ROUNDS

Defined in header <float.h>
#define FLT_ROUNDS /* implementation defined */
(since C99)

Returns the current rounding direction of floating-point arithmetic operations.

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

Notes

The rounding mode can be changed with fesetround and FLT_ROUNDS reflects that change.

See also

(C99)(C99)
gets or sets rounding direction
(function)
C++ documentation for FLT_ROUNDS

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/c/types/limits/FLT_ROUNDS

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部