GNU bug report logs - #75994
"seq -w" is broken for large enough numbers

Previous Next

Package: coreutils;

Reported by: Alexey Dobriyan <adobriyan <at> gmail.com>

Date: Sat, 1 Feb 2025 17:45:01 UTC

Severity: wishlist

Full log


View this message in rfc822 format

From: Alexey Dobriyan <adobriyan <at> gmail.com>
To: Pádraig Brady <P <at> draigbrady.com>
Cc: 75994 <at> debbugs.gnu.org
Subject: bug#75994: "seq -w" is broken for large enough numbers
Date: Sat, 1 Feb 2025 23:34:31 +0300
On Sat, Feb 01, 2025 at 08:01:18PM +0000, Pádraig Brady wrote:
> With -w seq will use long doubles internally,
> which usually have a 64 bit significand.
> I.e. once you go above 2^64, you get approximations of integers.
> 
> Now we could adjust seq to use the "ASCII" increment method
> in this case by handling leading zeros appropriately.
> It would be good to know your use case here though,
> as to know how common this issue might be.

The usecase is using GNU seq as reference implementation. :^)

I'd do decimal fixed point. Given that seq only does addition
it won't be that bad.




This bug report was last modified 123 days ago.

Previous Next


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