[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Human readable sort
From: |
Giuseppe Scrivano |
Subject: |
Re: Human readable sort |
Date: |
Thu, 21 May 2009 23:07:04 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.93 (gnu/linux) |
Pádraig Brady <address@hidden> writes:
> + Assume that numbers are properly abbreviated.
> + i.e. input will never have both 5000K and 6M. */
I think this is a too strong assumption. I wouldn't be surprised to
find, for example, both 1M and 1500K in a data set.
Are there problems to normalize values using this pseudo-code?
while (abs (a) > 1000) //or 1024
{
order_a += signum (a);
a /= 1000; //or 1024
}
do the same with b and only after compare them.
Regards,
Giuseppe
- Re: Human readable sort, Pádraig Brady, 2009/05/21
- Re: Human readable sort, Eric Blake, 2009/05/21
- Re: Human readable sort, Pádraig Brady, 2009/05/21
- Re: Human readable sort, Jim Meyering, 2009/05/22
- Re: Human readable sort, Pádraig Brady, 2009/05/22
- Re: Human readable sort, Jim Meyering, 2009/05/22
- Re: Human readable sort, Pádraig Brady, 2009/05/26
- Re: Human readable sort, Jim Meyering, 2009/05/27
- Re: Human readable sort, Matthew Woehlke, 2009/05/26
Re: Human readable sort,
Giuseppe Scrivano <=