Defined in header <cmath> float nanf( const char* arg ); (since C++11) double nan( const char* arg ); (since C++11) long double nanl( const char* arg ); (since C++11)
Converts the implementation-defined character string arg into the corresponding quiet NaN value, as if by calling std::strtod, std::strtof, or std::strtold, respectively, as follows:
The call std::nan("string") is equivalent to the call std::strtod("NAN(string)", (char**)NULL);.
The call std::nan("