If I print a NaN via std::cout or convert it to a string, does the standard say it has to be "nan" as a string?
Are there other methods to convert a NaN to a string, where this is not true?
#include <iostream>
#include <limits>
int main() {
float x = std::numeric_limits<float>::quiet_NaN();
std::cout << x << '\n'; // Output: nan
std::cout << std::to_string(x) << '\n'; // Output: nan
printf("%f", x); // Output: nan
// possibly other variants to print x
}