Paul Eggert <[EMAIL PROTECTED]> wrote:
> Pádraig Brady <[EMAIL PROTECTED]> writes:
>
>> The attached patch handles this by
>> only counting signficant digits from the operands.
>
> I'd rather use the idea I proposed earlier. Here's an implementation
> of it, which works on all the test cases in your patch. In addition,
> it works on the wilder counterexamples I suggested (which alas we
> can't put into the test suite since they're machine-specific).
>
> 2007-06-22 Paul Eggert <[EMAIL PROTECTED]>
>
> * NEWS: seq no longer mishandles obvious cases like
> "seq 0 0.000001 0.000003" by omitting the last output number.
> * doc/coreutils.texi (seq invocation): Remove advice about workaround
> for seq off-by-one problem, since the bug is fixed now. Replace
> it with more-generic advice about rounding error.
> * src/seq.c (long_double_format, print_numbers):
> New arg NUMERIC_FORMAT. All uses changed.
>
> 2007-06-22 Pádraig Brady <[EMAIL PROTECTED]> (trivial change)
>
> * tests/seq/basic: Add test cases for seq off-by-one problem.
Thanks to both of you!
I've applied that patch with minor changes to make the new code use the
STREQ macro rather than using strcmp directly. That has been informal
policy for years, since using STREQ makes the code more readable.
In fact, I think it's worth an addition to Makefile.maint,
so converted a few more and added a rule to enforce the policy:
2007-06-23 Jim Meyering <[EMAIL PROTECTED]>
Prefer "STREQ (a, b)" over "strcmp (a, b) == 0"; similar for != 0.
* src/base64.c (main): Likewise.
* src/install.c (setdefaultfilecon): Likewise.
* src/sort.c (main): Likewise.
* Makefile.maint (sc_prohibit_strcmp): New rule.
* .x-sc_prohibit_strcmp: New file, to list the few exceptions.
* Makefile.am (EXTRA_DIST): Add .x-sc_prohibit_strcmp.
_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils