GNU bug report logs - #72159
Numeric sorting does not work with 100.000 values

Previous Next

Package: coreutils;

Reported by: Martin MOKREJŠ <mmokrejs <at> gmail.com>

Date: Wed, 17 Jul 2024 16:10:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Martin MOKREJŠ <mmokrejs <at> gmail.com>
Subject: bug#72159: closed (Re: bug#72159: Numeric sorting does not work
 with 100.000 values)
Date: Wed, 17 Jul 2024 18:06:02 +0000
[Message part 1 (text/plain, inline)]
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 72159 <at> debbugs.gnu.org.

-- 
72159: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=72159
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Martin MOKREJŠ <mmokrejs <at> gmail.com>
Cc: 72159-done <at> debbugs.gnu.org
Subject: Re: bug#72159: Numeric sorting does not work with 100.000 values
Date: Wed, 17 Jul 2024 11:05:05 -0700
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.

[Message part 3 (message/rfc822, inline)]
From: Martin MOKREJŠ <mmokrejs <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: Numeric sorting does not work with 100.000 values
Date: Wed, 17 Jul 2024 11:28:59 +0200
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



This bug report was last modified 359 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.