1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00
uutils-coreutils/tests/fixtures/numfmt/gnutest_iec_input.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
329 B
Text

-1025
-1024.1
-1024
-1023.1
-1023
0
1
1023
1024
1025
1126
1127
1536
1537
1945
1946
1996
1997
2048
2049
10188
10189
10240
102348
102349
102400
971776
972288
972800
972801
973824
973825
1013760
1013761
1018879
1018880
1018881
1019904
1019905
1022976
1022977
1047552
1047553
1048575
1048576
1048577
1073741823
1073741824
1073741825