Summary
When --to=<scale> is combined with a --format that specifies precision 0 (e.g. %.0f), numfmt still prints one fractional digit. GNU honors the precision.
Found by fuzz_numfmt.
Reproduction
$ LC_ALL=C /usr/bin/numfmt --to=iec --format='%.0f' 5183776
5M
$ target/debug/numfmt --to=iec --format='%.0f' 5183776
5.0M
The precision specifier .0 in --format is ignored; uutils falls back to its default .1f-ish behaviour for scaled output.
Summary
When
--to=<scale>is combined with a--formatthat specifies precision0(e.g.%.0f),numfmtstill prints one fractional digit. GNU honors the precision.Found by
fuzz_numfmt.Reproduction
The precision specifier
.0in--formatis ignored; uutils falls back to its default.1f-ish behaviour for scaled output.