looking for someone to fix humanize_number (test cases included)

Clifton Royston cliftonr at volcano.org
Wed Dec 26 20:53:15 UTC 2012


On Wed, Dec 26, 2012 at 12:00:01PM +0000, freebsd-hackers-request at freebsd.org wrote:
> Date: Tue, 25 Dec 2012 14:52:09 -0500
> From: Eitan Adler <lists at eitanadler.com>
> To: freebsd-hackers at freebsd.org, John-Mark Gurney <jmg at funkthat.com>
> Subject: Re: looking for someone to fix humanize_number (test cases
> 	included)
> Message-ID:
> 	<CAF6rxgkCOdg2Ep2pdxJKjCyQzbYNrE_tPT3CqeygwrtZ6AkVSw at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
> 
> On 25 December 2012 14:46, Clifton Royston <cliftonr at volcano.org> wrote:
> >>   I correct myself: the function works fine, and there are no bugs I
> > could find, though it's clear the man page could emphasize the correct
> > usage a bit more.
> 
> Can you submit a diff to the man page as well? I figure if you got
> confused at least 10 others got even more confused.

  I'd be happy to, and will do so soon.  I would like to finish rereading
and poking the code a little more first, so I understand and can document how
scale actually works and what it's doing without "autoscale" set, which is
the actual case which John's tests first brought up.  Right now its results
for some test cases I'm writing don't make much sense to me, particularly
with HN_DIVISOR_1000.

  So far from find+grep under /usr/src it appears to me that every call
to humanize_number() in the code base is correctly passing HN_AUTOSCALE
- i.e. the ability to pass a specific scale is unused - which may be
why this never came up. 

  -- Clifton

-- 
   Clifton Royston  --  cliftonr at iandicomputing.com / cliftonr at volcano.org
       President  - I and I Computing * http://www.iandicomputing.com/
 Custom programming, network design, systems and network consulting services


More information about the freebsd-hackers mailing list