Bug 9041 - ls -lh does true rounding
Summary: ls -lh does true rounding
Status: NEW
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.23.x
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-22 22:45 UTC by John Ata
Modified: 2016-06-22 22:45 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Ata 2016-06-22 22:45:40 UTC
Given a file with 5734510790 bytes, Linux reports it with the -h option as 5.4G
while busybox reports it as 5.3G.   This is because Linux always rounds up no
matter how small the fraction while busybox does true rounding (The fraction is
5.340679353103042).  Normally a nit, however, when comparing identical
directories on two systems, this could get confusing leading one to believe that identical files are in fact different.  I realize that there's good arguments for both approaches but wondered if someone had thought about it.