Pádraig Brady <[EMAIL PROTECTED]> writes:

> Yes you could use gmp, but for normal uses of `seq`
> you could just use appropriate comparisons?
> How about the following patch, and we can also
> remove the workaround info from the docs.
>
> Pádraig.
>
> --- seq.orig.c  2007-06-08 07:50:24.000000000 +0000
> +++ seq.c       2007-06-08 09:05:23.000000000 +0000
> @@ -357,6 +357,10 @@
>         }
>      }
>
> +  /* perhaps can use nextafterl? */
> +  #define PRECISION 1.0E-15
> +  last.value += step.value + (step.value>0?-PRECISION:PRECISION);

That won't be enough, since the error adds up, so if you have a small
step but a big range you can still overshoot.  And if the error of your
step value is negative you may print more than expected.

Andreas.

-- 
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to