[coreutils] "ls -lh" rounds up the size of files instead of rounding hal
From:
crocket
Subject:
[coreutils] "ls -lh" rounds up the size of files instead of rounding half up/down.
Date:
Mon, 10 Jan 2011 12:30:54 -0800 (PST)
There is a file whose size is 42949837312bytes.
It's almost exactly 40.000153064727783GB.
"ls -lh" displays it as 41GB.
It is resulted due to rounding up.
However, rounding half down/up is much more common than rounding up in the real
world.
When I expect moderate file size approximation, this 1GB difference is not
ignorable.
Is there any reason for this behavior?
Or is it just a mistake?