negative-nan

Negative NaN is not a NaN?

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: Assertion `std::isnan(x)' failed. After printing the value of x, it turned out it's negative NaN (-nan) which is totally acceptable in my case. After trying to use the fact that NaN != NaN and using ass...