isnormal
确定浮点值是否为正常值。
语法
int isnormal(
/* floating-point */ x
); /* C-only macro */
template <class FloatingType>
inline bool isnormal(
FloatingType x
) throw(); /* C++-only function template */
参数
x
要测试的浮点值。
返回值
如果自变量 x
不是零、非正常、无限或 NaN,则 isnormal
返回非零值(在 C++ 代码中为 true
)。 否则,isnormal
返回 0(在 C++ 代码中为 false
)。
注解
isnormal
在编译为 C 时是宏,在编译为 C++ 时是内联函数模板。
要求
功能 | 必需的标头 (C) | 必需的标头 (C++) |
---|---|---|
isnormal |
<math.h> | <math.h> 或 <cmath> |
有关兼容性的详细信息,请参阅 兼容性。
另请参阅
数学和浮点支持
isfinite
、_finite
、_finitef
isinf
isnan
、_isnan
、_isnanf
_fpclass
、_fpclassf
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈