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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 72159 in the body.
You can then email your comments to 72159 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#72159; Package coreutils. (Wed, 17 Jul 2024 16:10:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Martin MOKREJŠ <mmokrejs <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Wed, 17 Jul 2024 16:10:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

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




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Wed, 17 Jul 2024 18:06:02 GMT) Full text and rfc822 format available.

Notification sent to Martin MOKREJŠ <mmokrejs <at> gmail.com>:
bug acknowledged by developer. (Wed, 17 Jul 2024 18:06:02 GMT) Full text and rfc822 format available.

Message #10 received at 72159-done <at> debbugs.gnu.org (full text, mbox):

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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 15 Aug 2024 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 104 days ago.

Previous Next


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