Date: Fri, 28 Dec 2012 15:56:53 -0500 From: Eitan Adler <lists@eitanadler.com> To: Eitan Adler <lists@eitanadler.com>, freebsd-hackers@freebsd.org, John-Mark Gurney <jmg@funkthat.com> Subject: Re: looking for someone to fix humanize_number (test cases included) Message-ID: <CAF6rxg=iTj-SdBtBupc8RkfwTUx6iV_yjv3bC%2B-Mi5CEmBFy9w@mail.gmail.com> In-Reply-To: <20121228200627.GA91874@volcano.org> References: <mailman.7.1356523201.47461.freebsd-hackers@freebsd.org> <20121226205307.GA66528@volcano.org> <20121227183136.GA77509@volcano.org> <20121228002433.GA80168@volcano.org> <20121228200627.GA91874@volcano.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 28 December 2012 15:06, Clifton Royston <cliftonr@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAF6rxg=iTj-SdBtBupc8RkfwTUx6iV_yjv3bC%2B-Mi5CEmBFy9w>