Paul Eggert wrote:
> Pádraig Brady <[EMAIL PROTECTED]> writes:
> 
>> OK, how about the attached patch?
> 
> Better, but it still has problems.  For example, on my platform
> (Debian stable with GCC 4.2.0, x86) the command
> "seq 0.0 0.1 0.90000000000000000000" outputs something different from
> "seq 0.0 0.1 0.9".  The former stops at 0.8, the latter at 0.9.

You're stretching :)
I'll see if I can fix that,
but I do think it's much better that what we have currently.

> In general, if we want seq's numeric behavior to be independent of the
> format of the operand numbers, I think we have to take a different
> approach.
> 
> Here's an idea.  Use sprintf to convert the numbers to a textual
> format and back, and then use the result of _that_ comparison instead
> of the internal floating-point comparison.  For speed, do this only
> for the number "one past" the number that "seq" would ordinarily print
> now.  Also, don't bother to print this extra number if it's textually
> identical to the previously printed number.
> 
> Whaddya think?

I'll have another look.

Pádraig.


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

Reply via email to