Subject: bug#72159: closed (Re: bug#72159: Numeric sorting does not work with 100.000 values)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 17 Jul 2024 18:06:02 +0000

Your bug report

#72159: Numeric sorting does not work with 100.000 values

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
72159: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=72159
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#72159: Numeric sorting does not work with 100.000 values
From: Paul Eggert <[email-masked]>
To: Martin MOKREJŠ <[email-masked]>
Cc: [email-masked]
Date: Wed, 17 Jul 2024 11:05:05 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

On 2024-07-17 02:28, Martin MOKREJŠ wrote:
> $ LANG=C sort -k 1 -k 3,3n -r somefile.tsv

It's not a bug, because that 'sort' isn't doing what you think it's 
doing. Please try 'sort --debug' to see what's going on.

Subject: Numeric sorting does not work with 100.000 values
From: Martin MOKREJŠ <[email-masked]>
To: [email-masked]
Date: Wed, 17 Jul 2024 11:28:59 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,
   I think I found a bug in sort from coreutils-9.5 on Gentoo Linux:

$ LANG=C sort -k 1 -k 3,3n -r somefile.tsv | head
LH00211:37:222VFLLT1:1:2270:9996:7938:TACGTCACG	MN908947.3	97.333	150	4	0	1	150	22850	22999	5.82e-46	171
LH00211:37:222VFLLT1:1:2270:9996:7938:TACGTCACG	MN908947.3	96.667	150	5	0	1	150	23133	22984	2.53e-45	169
LH00211:37:222VFLLT1:1:2270:9996:23383:CGGGTCCTC	MN908947.3	99.333	150	1	0	1	150	22844	22695	7.14e-48	178
LH00211:37:222VFLLT1:1:2270:9996:23383:CGGGTCCTC	MN908947.3	99.286	140	1	0	11	150	22568	22707	2.47e-44	166
LH00211:37:222VFLLT1:1:2270:9996:22101:GAAGGATTC	MN908947.3	98.667	150	2	0	1	150	22850	22999	3.10e-47	176
LH00211:37:222VFLLT1:1:2270:9996:22101:GAAGGATTC	MN908947.3	97.333	150	4	0	1	150	23133	22984	5.82e-46	171
LH00211:37:222VFLLT1:1:2270:9996:21012:CGTGACGCA	MN908947.3	98.000	150	3	0	1	150	23133	22984	1.34e-46	173
LH00211:37:222VFLLT1:1:2270:9996:21012:CGTGACGCA	MN908947.3	100.000	150	0	0	1	150	22850	22999	1.65e-48	180
LH00211:37:222VFLLT1:1:2270:9987:8915:CACCGATGT	MN908947.3	98.571	140	2	0	11	150	22568	22707	1.07e-43	164
LH00211:37:222VFLLT1:1:2270:9987:8915:CACCGATGT	MN908947.3	97.333	150	4	0	1	150	22844	22695	5.82e-46	171
$

The line 8 with value 100.000 should appear one line earlier, on line 7 (the value 100.000 should precede 98.000). I want to sort by first column and then numerically the float values in column 3, highest to lowest. It works for float values below 100.

Thank you,
Martin