The IEEE spec says that comparisons (equal, not-equal, less, ...) all return false if either is a NAN, but I don't know what the ML spec says. There are strong arguments for NOT requiring this in a language spec. It would mean that you can't efficiently reverse branch conditions, for instance.