[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] SEQ BUG
From: |
Jim Meyering |
Subject: |
Re: [PATCH] SEQ BUG |
Date: |
Fri, 22 Jun 2007 21:32:09 +0200 |
Paul Eggert <address@hidden> wrote:
> Pádraig Brady <address@hidden> writes:
...
>> Aren't you susceptible to whatever rounding
>> printf does internally?
>
> Yes, that's quite true. One can easily construct examples where the
> revised "seq" is mathematically incorrect, due to this problem.
> For example, on x86:
>
> $ seq -f %.20g 0 0.1 1.3
> 0
> 0.1
> 0.2
> 0.30000000000000000001
> 0.40000000000000000001
> 0.5
> 0.60000000000000000002
> 0.69999999999999999999
> 0.80000000000000000001
> 0.90000000000000000003
> 1
> 1.1
> 1.2
I was just looking at a similar example:
$ ./seq --format=%.21g .000002 .000001 .000003
2.00000000000000000007e-06
Admittedly contrived, and not really an objection.
- [PATCH] SEQ BUG, (continued)
- [PATCH] SEQ BUG, Pádraig Brady, 2007/06/13
- Re: [PATCH] SEQ BUG, Paul Eggert, 2007/06/13
- Re: [PATCH] SEQ BUG, Pádraig Brady, 2007/06/13
- Re: [PATCH] SEQ BUG, Pádraig Brady, 2007/06/19
- Re: [PATCH] SEQ BUG, Paul Eggert, 2007/06/19
- Re: [PATCH] SEQ BUG, Pádraig Brady, 2007/06/20
- Re: [PATCH] SEQ BUG, Pádraig Brady, 2007/06/20
- Re: [PATCH] SEQ BUG, Paul Eggert, 2007/06/22
- Re: [PATCH] SEQ BUG, Pádraig Brady, 2007/06/22
- Re: [PATCH] SEQ BUG, Paul Eggert, 2007/06/22
- Re: [PATCH] SEQ BUG,
Jim Meyering <=
- Re: [PATCH] SEQ BUG, Micah Cowan, 2007/06/22
- Re: [PATCH] SEQ BUG, Paul Eggert, 2007/06/22
- Re: [PATCH] SEQ BUG, Pádraig Brady, 2007/06/22
- Re: [PATCH] SEQ BUG, Paul Eggert, 2007/06/22
- Re: [PATCH] SEQ BUG, Jim Meyering, 2007/06/23
Re: SEQ BUG, John Cowan, 2007/06/07