1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 19:47:45 +00:00
uutils-coreutils/tests/fixtures/numfmt/gnutest_iec-i_result.txt
Daniel Rocco 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

49 lines
288 B
Text

-1.1Ki
-1.1Ki
-1.0Ki
-1.0Ki
-1023
0
1
1023
1.0Ki
1.1Ki
1.1Ki
1.2Ki
1.5Ki
1.6Ki
1.9Ki
2.0Ki
2.0Ki
2.0Ki
2.0Ki
2.1Ki
10Ki
10Ki
10Ki
100Ki
100Ki
100Ki
949Ki
950Ki
950Ki
951Ki
951Ki
952Ki
990Ki
991Ki
995Ki
995Ki
996Ki
996Ki
997Ki
999Ki
1000Ki
1023Ki
1.0Mi
1.0Mi
1.0Mi
1.1Mi
1.0Gi
1.0Gi
1.1Gi