Here's a difficult question: what to order first, NaN or NULL. I would have said NULL, but this implementation chooses NaN.