bug-coreutils
[Top][All Lists]
Advanced

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

Re: sort ignoring human readable suffixes


From: Paul Eggert
Subject: Re: sort ignoring human readable suffixes
Date: Mon, 06 Sep 2004 10:46:15 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Lucas Nussbaum <address@hidden> writes:

>> Come to think of it, if -h implied -g instead, you might have a
>> simpler implementation (albeit one with rounding errors and slower
>> performance).
>
> This would break with exabytes.

Why?  -g uses floating point, and 1 EB (10**18) can be represented
exactly as an IEEE double.  An IEEE double can even represent one ZB
(10**21) exactly.  It does have a rounding error once you get to the
YB (10**24) range but like I said, there would be rounding errors.
And if you're talking about powers of 1024 not 1000, even one YiB
(2**80) can be represented exactly.

> My need for this is only to be able to sort output of commands like
> du -h.

Having -h imply -g would do this, no?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]