NAN
From cppreference.net
C++
Numerics library
| Common mathematical functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Mathematical special functions (C++17) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Mathematical constants (C++20) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Basic linear algebra algorithms (C++26) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Data-parallel types (SIMD) (C++26) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Floating-point environment (C++11) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Complex numbers | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Numeric array (
valarray
)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Pseudo-random number generation | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Bit manipulation (C++20) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Saturation arithmetic (C++26) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Factor operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Interpolations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Generic numeric operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| C-style checked integer arithmetic | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Common mathematical functions
| Nearest integer floating point operations | |||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| Floating point manipulation functions | |||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| Classification and comparison | |||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||
| Types | |||||||||||||||||||||||||||||||||||||||||
| Macro constants | |||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
|
定义于头文件
<cmath>
|
||
|
#define NAN /*由实现定义*/
|
(C++11 起) | |
宏
NAN
展开为类型
float
的常量表达式,其值表示静默非数(QNaN)。若实现不支持 QNaN,则此宏常量未被定义。
注释
存在许多不同的 NaN 值,通过其有效载荷和符号位进行区分。由宏
NAN
生成的 NaN 的有效载荷内容和符号位是由实现定义的。
参见
|
(C++11)
(C++11)
(C++11)
|
非数值(NaN)
(函数) |
|
(C++11)
|
检查给定数值是否为 NaN
(函数) |
|
[static]
|
标识可表示特殊值“静默非数值”(NaN)的浮点类型
(
std::numeric_limits<T>
的公开静态成员常量)
|
|
[static]
|
标识可表示特殊值“信号非数值”(NaN)的浮点类型
(
std::numeric_limits<T>
的公开静态成员常量)
|
|
[static]
|
返回给定浮点类型的静默 NaN 值
(
std::numeric_limits<T>
的公开静态成员函数)
|
|
[static]
|
返回给定浮点类型的信号 NaN 值
(
std::numeric_limits<T>
的公开静态成员函数)
|
|
C 文档
关于
NAN
|
|