From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 28 20:57:32 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A9585FDD for ; Fri, 28 Dec 2012 20:57:32 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com [209.85.215.51]) by mx1.freebsd.org (Postfix) with ESMTP id 1F70C8FC08 for ; Fri, 28 Dec 2012 20:57:31 +0000 (UTC) Received: by mail-la0-f51.google.com with SMTP id fj20so1414335lab.10 for ; Fri, 28 Dec 2012 12:57:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=00R7vCCx6RStFwPKjy2HR2uA7XRSC9QSOJ7dEiAsFfo=; b=Ys93irXGy7MfKduTKw2vntCwUoObfZj3WMBhLuEdJxK3P7HDFAocTFX6UUatlV7Sih oE3/A9bmY8vOZwPMbyphOeyJxa6jA2RX4siJheck7rIMvynP+cjFcGJD9rGrFMtL8Xpo onPTxRELd0LMPi5fWudlI5jUQj0l1JDneMbHY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:x-gm-message-state; bh=00R7vCCx6RStFwPKjy2HR2uA7XRSC9QSOJ7dEiAsFfo=; b=EWty1NOXZPEGk/gTXU7rZ0QgbLB4N8slCjjS2ZKEyXpol5vHRGO3TOq2/O4z8DVswV pYO+UT4opf9aKWW6dKQr2sKREqCj11/9L6JCy5KJyOYM/n7h7sOBXZwe+zQr+N9tYe2/ 0wJNuqtWUDaf2DrlIRyFx+B1+szetLSbNa5/9E95gM7Y3pgDNrF43FYAyNiVgGvoE7ym SREmixuXmXbeFuCKMPvJYFLPOIiguVv567It+MooqUefSekt0BvWdhj4Q1+jvrD2ye/7 5aXwTPOvRkjNWiQaMEUpnoB9l4O/iHmLK0jpPsZWcG82E4+oXl6g3EVQiAqKMwUWCOwH VZig== Received: by 10.112.25.198 with SMTP id e6mr14122214lbg.63.1356728244564; Fri, 28 Dec 2012 12:57:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.87.102 with HTTP; Fri, 28 Dec 2012 12:56:53 -0800 (PST) In-Reply-To: <20121228200627.GA91874@volcano.org> References: <20121226205307.GA66528@volcano.org> <20121227183136.GA77509@volcano.org> <20121228002433.GA80168@volcano.org> <20121228200627.GA91874@volcano.org> From: Eitan Adler Date: Fri, 28 Dec 2012 15:56:53 -0500 Message-ID: Subject: Re: looking for someone to fix humanize_number (test cases included) To: Eitan Adler , freebsd-hackers@freebsd.org, John-Mark Gurney Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQmQsHLdY4DNvFoev/w9BOMJIei0dtBGqMA7Z6Al9/0rH1xmsmZfavwVDlIDk8QeDcseSbUe X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Dec 2012 20:57:32 -0000 On 28 December 2012 15:06, Clifton Royston 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