bug-sh-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (forw) sh-utils-2.0 seq Bug


From: Jim Meyering
Subject: Re: (forw) sh-utils-2.0 seq Bug
Date: Thu, 20 Sep 2001 09:34:10 +0200
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.0.106

Thanks for the report and patch.  However, I'm not convinced that seq
should be changed.  What you're seeing is an artifact of floating point
arithmetic, and making seq change LAST to accommodate it is dangerous.
What if I use seq with an increment on the order of DBL_EPSILON?
Then any increase in LAST will cause seq to generate more output.
That shouldn't happen.

Maybe the real problem is that you're trying to use limited precision
floating point arithmetic to represent a value like .1, that cannot be
represented exactly.

Juergen Salk <address@hidden> wrote:
> I've already sent this bug report to <address@hidden>,
> but didn't get any response or confirmation up to now. From
> what I've seen in the sh-utils ChangeLog, you seem to be
> a key person for the sh-utils, so maybe you can at least
> forward this message to someone, who's responsible for
> maintaining the package.
>
> Problem:
>
> seq does not always print all numbers from FIRST to LAST.
> The output may vary with different systems.
>
> Here is a screen dump on Linux-2.2.19 (i386):
>
> address@hidden:~ > seq -s " " 0 .1 1
> 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9   # 1 missing
...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]