Of course the other problem is that there's no standard textual representation of NaN payloads (i.e., their fractions).
On my long list of things to do is to have sort -g sort more
deterministically with NaNs. This could be done with the new totalorder
and totalorderl functions in C23 Annex F.10.12.1, if available. The fix
would not be portable (a these functions are newly sort-of-standardized
and are often not available) but it should be better than nothing.
- bug#66256: sorting NAN values with "general-numeric’ Jorge Stolfi
- bug#66256: sorting NAN values with "general-numer... Pádraig Brady
- bug#66256: sorting NAN values with "general-n... Paul Eggert