Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否有正确的方法来检查 QNAN 以外
double t = <QNAN>; if(t != t) { //t is QNAN }
isnan() 是 C++11 的一部分。
std::isnan(float); std::isnan(double); std::isnan(long double);