While writing some test cases, and some of the tests check for the result of a NaN.
I tried using std::isnan but the assert failes:
Asse
You can check the bits of number. IEEE 754 has defined mask for NaN:
This might be not portable, but if you are sure about your platfofm it can be acceptable. More: http://publib.boulder.ibm.com/infocenter/lnxpcomp/v8v101/index.jsp?topic=/com.ibm.xlf101l.doc/xlfopg/fpieee.htm