在线文档教程
C++
数字 | Numerics

NAN

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

NAN扩展为类型的常量表达式。float它的计算值为安静的非a-数字%28 QNaN%29值。如果实现不支持QNaNs,则不定义此宏常量。

注记

有许多不同的NaN值,根据它们的有效载荷和符号位来区分。由宏生成的有效载荷和符号位的内容。NAN是实现定义的。

另见

nannanfnanl (C++11)(C++11)(C++11)not-a-number (NaN) (function)
isnan (C++11)checks if the given number is NaN (function)
has_quiet_NaN staticidentifies floating-point types that can represent the special value "quiet not-a-number" (NaN) (public static member constant of std::numeric_limits)
has_signaling_NaN staticidentifies floating-point types that can represent the special value "signaling not-a-number" (NaN) (public static member constant of std::numeric_limits)
quiet_NaN staticreturns a quiet NaN value of the given floating-point type (public static member function of std::numeric_limits)
signaling_NaN staticreturns a signaling NaN value of the given floating-point type (public static member function of std::numeric_limits)

c NAN文件

© cppreference.com

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

http://en.cppreference.com/w/cpp/nn.2