NaN is not one bit pattern: sorting floats by integer keys
A float NaN is many bit patterns, not one value. Ranking floats by an integer key made from those bits (radix sort, top-k) can order NaNs against each other and break a stable column tie. Canonicalize every NaN to one pattern before building the key.
Read the full article for free
First visit? No sign-up needed. We'll email you a 6-digit sign-in code. No password required.
Continue with email