Comment 3 for bug 1799868

Revision history for this message
C de-Avillez (hggdh2) wrote :

Hello Kevin, and thank you for opening this bug and helping make Ubuntu better.

The info page for seq (info seq) has the following note:

" On most systems, seq can produce whole-number output for values up to
at least 2^{53}. Larger integers are approximated. The details differ
depending on your floating-point implementation. *Note Floating
point::. A common case is that ‘seq’ works with integers through
2^{64}, and larger integers may not be numerically correct:

     $ seq 50000000000000000000 2 50000000000000000004
     50000000000000000000
     50000000000000000000
     50000000000000000004

   However, note that when limited to non-negative whole numbers, an
increment of 1 and no format-specifying option, seq can print
arbitrarily large numbers.

   Be careful when using ‘seq’ with outlandish values: otherwise you may
see surprising results, as ‘seq’ uses floating point internally. For
example, on the x86 platform, where the internal representation uses a
64-bit fraction, the command:

     seq 1 0.0000000000000000001 1.0000000000000000009

   outputs 1.0000000000000000007 twice and skips 1.0000000000000000008."

Now, 2^64 is 18446744073709551616, which is *much* smaller than the values you are using. So... you are in the boundary of the map, where it is written "here be dragons."

I ran 'seq' with your initial value, and increment of 1, and varying end-values, all larger than the initial value. All seemed to work correctly. But the moment I changed the increment... things went south very fast (including what seemed as an infinite loop, with 'seq' outputting the same value over and over).

I am in a mind of closing this bug INVALID, but wanted to have your input before that.

Thank you.