Re: [PATCH 5/6] Use floating point for --dirstat percentages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johan Herland <johan@xxxxxxxxxxx> writes:

> Allow specifying --dirstat cut-off percentage as a floating point number.
>
> When printing the dirstat output, floating point numbers are presented in
> rounded form (as opposed to truncated).

Why isn't it sufficient to change

	permille = this_dir * 1000 / changed

to

	permille = (this_dir * 2000 + changed) / (changed * 2)

or something?  If rounding is the only issue that bothers you (I admit
that it does bother me, now that you brought it up), that is.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]