Possible Duplicate: Checking if a double (or float) is nan in C++
How should I do to test NaN in C++ in portable/correct/standard manner?