fixed numeric comparison involving NaN