coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

seq: different output for `seq --format=d%030g 12`

Open sylvestre opened this issue 1 year ago • 1 comments

With our:

$ ./target/debug/coreutils seq --format=d%030g 15
d000000000000000000000000000001
[...]
d000000000000000000000000000009
d00000000000000000000000001e+01
d00000000000000000000000001e+01
d00000000000000000000000001e+01

with GNU:

/usr/bin/seq --format=d%030g 15
d000000000000000000000000000001
[...]
d000000000000000000000000000009
d000000000000000000000000000010
d000000000000000000000000000011
d000000000000000000000000000012
d000000000000000000000000000013
d000000000000000000000000000014
d000000000000000000000000000015

it causes tests/cp/link-heap to fail

sylvestre avatar Jan 01 '24 16:01 sylvestre

Seems that it is coming from this function: https://github.com/uutils/coreutils/blob/97cb2b2de6efa884a45af0ca255f85dcd135345e/src/uucore/src/lib/features/format/num_format.rs#L364

sylvestre avatar Jan 01 '24 16:01 sylvestre