Is there an isnan() function?
PS.: I\'m in MinGW (if that makes a difference).
I had this solved by using isnan() from , which doe
This detects infinity and also NaN in Visual Studio by checking it is within double limits:
//#include double x, y = -1.1; x = sqrt(y); if (x >= DBL_MIN && x <= DBL_MAX ) cout << "DETECTOR-2 of errors FAILS" << endl; else cout << "DETECTOR-2 of errors OK" << endl;