Commit Graph
3 Commits
Author SHA1 Message Date
Alex Snaps 448dde7f5c Fixed tests to reflect si's handling of kilos
Signed-off-by: Alex Snaps <alex@wcgw.dev>
2025-02-18 16:32:53 -05:00
Daniel Rocco 0e02607dc7 numfmt: implement --field 2021-03-08 10:53:34 -05:00
Daniel RoccoandGitHub d06f91fbe2 numfmt: align format output values with GNU (#1745)
When converting to SI or IEC, produce values that align with the conventions
used by GNU numfmt.

- values > 10 are represented without a decimal place, so 10000 becomes 10K
  instead of 10.0K

- when truncating, take the ceiling of the value, so 100001 becomes 101K

- values < 10 are truncated to the highest tenth, so 1001 becomes 1.1K

closes #1726
2021-03-06 18:26:05 +01:00