mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 19:17:43 +00:00

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
49 lines
329 B
Text
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
|