Skip to content

numfmt: cap IEC precision at 3 decimals#11959

Open
pocopepe wants to merge 1 commit intouutils:mainfrom
pocopepe:11926
Open

numfmt: cap IEC precision at 3 decimals#11959
pocopepe wants to merge 1 commit intouutils:mainfrom
pocopepe:11926

Conversation

@pocopepe
Copy link
Copy Markdown
Contributor

Fixes #11926

Added effective_precision = precision.min(3) for iec units in consider_suffix to match gnu's rounding behaviour. Tests added for both the IEC cap and that SI is unaffected.
Verified against GNU 9.4.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 23, 2026

GNU testsuite comparison:

GNU test failed: tests/timeout/timeout-group. tests/timeout/timeout-group is passing on 'main'. Maybe you have to rebase?
Skipping an intermittent issue tests/cut/bounded-memory (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tail/symlink (passes in this run but fails in the 'main' branch)
Note: The gnu test tests/cp/link-heap is now being skipped but was previously passing.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 23, 2026

Unable to generate the performance report

There was an internal error while processing the run's data. We're working on fixing the issue. Feel free to contact us on Discord or at [email protected] if the issue persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

numfmt: --to=iec with high-precision --format reveals extra digits (differs from GNU)

1 participant