If you have a double value set to NaN you can check that it's NaN only through the Double.IsNaN method. MSDN quote: "Use IsNaN to determine whether a value is not a number. It is not possible to determine whether a value is not a number by comparing it to another value equal to NaN."
In other words, there is no guarantee that (Double.NaN == Double.NaN).
A simple question - WHY ?