bug#66256: sorting NAN values with "general-numeric’

2023-09-28 Thread Paul Eggert
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

bug#66253: sort manpage should be more explicit

2023-09-28 Thread Paul Eggert
On 9/28/23 04:22, Pádraig Brady wrote:   -n, --numeric-sort  compare according to string numerical value.     leading blanks, negative sign, decimal point,     and thousands separators are supported. Although a valiant

bug#66256: sorting NAN values with "general-numeric’

2023-09-28 Thread Pádraig Brady
On 28/09/2023 11:43, Jorge Stolfi wrote: The full documentation of the "--general-numeric-sort" option of {sort} says that NaN values are sorted "in a consistent but machine-dependent order". This is not good. The point of the IEEE floating-point standard was to make the results of

bug#66253: sort manpage should be more explicit

2023-09-28 Thread Jorge Stolfi
The full documentation of sort explains that numeric sorting (as in "sort -n") accepts a leading "-" sign, decimal points, thousands separators, etc, but does not accept an explicit "+" sign. Values with explicit "+" are treated as numeric 0 and ties are broken by alpha sort. However, the

bug#66256: sorting NAN values with "general-numeric’

2023-09-28 Thread Jorge Stolfi
The full documentation of the "--general-numeric-sort" option of {sort} says that NaN values are sorted "in a consistent but machine-dependent order". This is not good. The point of the IEEE floating-point standard was to make the results of floating-point computations be independent of

bug#66253: sort manpage should be more explicit

2023-09-28 Thread Pádraig Brady
On 28/09/2023 11:11, Jorge Stolfi wrote: The full documentation of sort explains that numeric sorting (as in "sort -n") accepts a leading "-" sign, decimal points, thousands separators, etc, but does not accept an explicit "+" sign. Values with explicit "+" are treated as numeric 0 and ties are