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
This is based off the wikipedia article posted in the comments. Note that it's entirely untested -- it should give you an idea of something you can do though.
bool reallyIsNan(float x)
{
//Assumes sizeof(float) == sizeof(int)
int intIzedX = *(reinterpret_cast(&x));
int clearAllNonNanBits = intIzedX & 0x7F800000;
return clearAllNonNanBits == 0x7F800000;
}
EDIT: I really think you should consider filing a bug with the GLibc guys on that one though.