On 04/07/2016 08:18 PM, Pádraig Brady wrote: > I agree that we should avoid repeating output with "0" STEP. Thanks. I improved the error diagnostic by outputting the original value from the user: [PATCH 1/2] seq: do not allow 0 as increment value > Do we want to deal with these cases spinning the cpu? > > seq 1 nan 1 This is addressed with the second patch: [PATCH 2/2] seq: do not allow NaN arguments > seq 1 .0000000000000000000000000000001 1 I consider this a bug in seq: from mathematical point of view, the above should just output "1" and then exit, because after adding that tiny number the next number would be greater than LAST. IMO we should enhance seq_fast() to do all the Math when no special output format is given. WDYT? > As an aside, I see FreeBSD requires the STEP to be in the right direction > when FIRST != LAST, or it will also exit with error. > GNU will just output nothing in that case. I think GNU seq's behavior is okay, and therefore I agree with Paul in http://lists.gnu.org/archive/html/bug-coreutils/2016-04/msg00032.html Have a nice day, Berny