Inspired by Pádraig's April-fools post,
http://thread.gmane.org/gmane.comp.gnu.coreutils.general/972
and spurred by the fact that Torbjorn and Niels had to roll
their own seq-like program to test their new factoring code
(http://gmplib.org:8000/factoring), I have made coreutils' seq
usable for arbitrarily large, non-negative whole numbers.
This has two advantages:
- correctness with large numbers
- improved performance in common cases
For very large numbers, the new seq now appears to be correct:
$ b=10000000000000000000000000000000000000000000000000000000000000
$ src/seq ${b}09 ${b}11
1000000000000000000000000000000000000000000000000000000000000009
1000000000000000000000000000000000000000000000000000000000000010
1000000000000000000000000000000000000000000000000000000000000011
while the old one would infloop, printing garbage:
$ seq ${b}09 ${b}11 |head -2
999999999999999999965225407341472151966654053379893968647487488
999999999999999999965225407341472151966654053379893968647487488
This also means that nt-factor's tests can now use coreutils' seq
to generate their inputs.