std::numeri...gnaling_NaN(3)
okay so bestie, welcome to the std::numeri...gnaling_NaN(3) page from the C++ Standard Libary β we're here to talk about std::numeric_limits::has_signaling_NaN, and yes the title is giving dramatic ellipsis energy π
πΈ NAME πΈ
std::numeric_limits::has_signaling_NaN β std::numeric_limits::has_signaling_NaN (she said it twice, and honestly? periodt.)
β¨ Synopsis β¨
okay so here's the exact signature situation, no cap:
static const bool has_signaling_NaN; (until C++11)
static constexpr bool has_signaling_NaN; (since C++11)
The value of std::numeric_limits<T>::has_signaling_NaN is true for all types T capable of representing the special value "Signaling Not-A-Number". This constant is meaningful for all floating-point types and is guaranteed to be true if std::numeric_limits<T>::is_iec559 == true.
π Standard specializations π
Vibe check for every T β the value of std::numeric_limits<T>::has_signaling_NaN is:
/* non-specialized */βfalseboolβfalsecharβfalsesigned charβfalseunsigned charβfalsewchar_tβfalsechar8_t(since C++20) βfalsechar16_t(since C++11) βfalsechar32_t(since C++11) βfalseshortβfalseunsigned shortβfalseintβfalseunsigned intβfalselongβfalseunsigned longβfalselong long(since C++11) βfalseunsigned long long(since C++11) βfalsefloatβ usuallytruedoubleβ usuallytruelong doubleβ usuallytrue
π See also π
Other little icons in the same orbit π«Ά:
quiet_NaNβ returns a quiet NaN value of the given floating-point type;[static](public static member function)has_infinityβ identifies floating-point types that can represent the special value "positive infinity";[static](public static member constant)has_quiet_NaNβ identifies floating-point types that can represent the special value "quiet not-a-number" (NaN);[static](public static member constant)
and that's the page! source: http://cppreference.com Β· version/date: 2024.06.10 β bye bestie, go stan signaling NaNs responsibly πβ¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms