[Toybox] [PATCH] Fix various seq bugs.
enh
enh at google.com
Sun Sep 10 12:00:07 PDT 2017
On Fri, Sep 8, 2017 at 4:10 PM, Rob Landley <rob at landley.net> wrote:
> On 05/23/2017 02:18 AM, Josh Gao wrote:
>> On Mon, May 22, 2017 at 11:54 PM, Rob Landley <rob at landley.net
>> <mailto:rob at landley.net>> wrote:
>>
>> What's the use case for this code? Did they notice a difference from gnu
>> and say "any difference is a bug", or was somebody actually trying to do
>> something that broke?
>>
>>
>> The surprising behavior that I ran into was this:
>>
>> $ seq 1000000 1000001
>> 1e+06
>> 1e+06
>
> Ok, digging back down to this, that was the only issue you hit? It
> should _not_ spontaneously produce engineering notation output? (Agreed,
> of course...)
(sorry, been sick.)
yes, the only bug that was reported was that.
all the rest were based on poking at GNU seq to see how it behaves. as
yet i've had no requests for any of the oddities i found.
> Because you did other stuff while you were there:
>
> 1) You changed tests/seq.test to make sure we reproduce the bug where
> seq acts like yes, counting by zero. Is there a use case for this bug?
> (Yes exists, output of seq was previously guaranteed to terminate... I
> see busybox reproduces the ubuntu behavior but that's their default
> position in the absence of a spec, I'm trying to figure out what's the
> right thing to do...)
>
> 2) You have code to checking and make sure "1.234e06" maintains the same
> number of digits of precision. Is there something that cares about that?
> Your test is 1.0e0, which is the same with and without the e0?
>
> (I sometimes use added tests as guidance for "use cases you care about",
> and I'm not really getting it from these...)
>
> Rob
>
> P.S. We got GPS to work at $DAYJOB! Yay! Still lots to do but light at
> the end of the darn tunnel...
> _______________________________________________
> Toybox mailing list
> Toybox at lists.landley.net
> http://lists.landley.net/listinfo.cgi/toybox-landley.net
--
Elliott Hughes - http://who/enh - http://jessies.org/~enh/
Android native code/tools questions? Mail me/drop by/add me as a reviewer.
More information about the Toybox
mailing list