looking for someone to fix humanize_number (test cases included)

Eitan Adler lists at eitanadler.com
Fri Dec 28 20:57:32 UTC 2012


On 28 December 2012 15:06, Clifton Royston <cliftonr at volcano.org> wrote:
> On Thu, Dec 27, 2012 at 02:24:33PM -1000, Clifton Royston wrote:
>> On Thu, Dec 27, 2012 at 08:31:36AM -1000, Clifton Royston wrote:
>> > ...
>> >  I'll put the updated test program somewhere shortly.
>>
>>   Test code and draft of revisions to function are at
>>
>>     http://www.volcano.org/misc/humanize_number/
>
> Improved revision of function, improved tests (up to 177 now), and an
> updated man page are now at the above URL.
>
> Of note in the latest code revision: I corrected the code to correctly
> scale and format values to +/- INT64_MAX (except when scale == 0); it
> will now handle values above 82 petabytes (INT64_MAX/100) which never
> worked correctly before.  Invalid arguments are better detected and
> rejected.
>
> The tests now cover boundary cases for large number values, and have
> some command line options to control what subset of tests get run,
> initial buffer size, etc.
>
> The man page now documents correct values for the scale argument, what
> the output and return values are for scale == 0, when 'K' vs 'k' is
> used in the output, and which invalid parameters will cause an
> assertion, along with some changes to wording mostly relating to the
> 1024 vs 1000 divisor.
>
> I think I'm done playing with it now.

My computer is broken at the moment (hardware issue).  I will review,
comment, and hopefully commit when I manage to fix it.


-- 
Eitan Adler


More information about the freebsd-hackers mailing list