#include <iostream>
#include <cmath>
using namespace std;
// Return non-zero if x is a NaN and zero otherwise
int main()
{
cout << "isnan(0.0) = " << isnan(0.0) << endl;
cout << "isnan(NAN) = " << isnan(NAN) << endl;
cout << "isnan(INFINITY) = " << isnan(INFINITY) << endl;
cout << "isnan(INFINITY / -INFINITY) = " << isnan(INFINITY / - INFINITY) << endl;
return 0;
}
/*
run:
isnan(0.0) = 0
isnan(NAN) = 1
isnan(INFINITY) = 0
isnan(INFINITY / -INFINITY) = 1
*/