Why do comparisons of NaN values behave differently from all other values? That is, all comparisons with the operators ==, <=, >=, <, > where one or both values is NaN
From the wikipedia article on NaN, the following practices may cause NaNs:
Since there is no way to know which of these operations created the NaN, there is no way to compare them that makes sense.