#include <iostream>
#include <cmath> // For std::isnan
int main() {
double d = std::nan(""); // Example NaN value
if (std::isnan(d)) {
std::cout << "The value is NaN." << std::endl;
} else {
std::cout << "The value is not NaN." << std::endl;
}
}
/*
run:
The value is NaN.
*/