[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gawk number to string bug
From: |
Andrew J. Schorr |
Subject: |
Re: gawk number to string bug |
Date: |
Tue, 20 Dec 2005 09:39:35 -0500 |
User-agent: |
Mutt/1.4.1i |
On Tue, Dec 20, 2005 at 09:06:32AM -0500, Andrew J. Schorr wrote:
> 32-bit x86:
> tmpval = 18446744073709551616, UINTMAX_MAX = 4294967295,
> (double)UINTMAX_MAX = 18446744073709551616, (tmpval <= UINTMAX_MAX) = 1
> uval = 0
> 64-bit x86 (opteron):
> tmpval = 18446744073709551616, UINTMAX_MAX = 18446744073709551615,
> (double)UINTMAX_MAX = 18446744073709551616, (tmpval <= UINTMAX_MAX) = 1
> uval = 0
Actually, on both of those platforms, UINTMAX_MAX is defined
as 18446744073709551615ULL, so the 32-bit printf is misleading (because
I was converting it down to 32 bits from 64 bits). But that doesn't
affect the real problem here: (tmpval <= UINTMAX_MAX) is giving the
wrong result.
Regards,
Andy
- Re: gawk number to string bug, (continued)
- Re: gawk number to string bug, Eli Zaretskii, 2005/12/19
- Re: gawk number to string bug, Andrew J. Schorr, 2005/12/19
- Re: gawk number to string bug, Eli Zaretskii, 2005/12/19
- Re: gawk number to string bug, Paul Eggert, 2005/12/19
- Re: gawk number to string bug, John Cowan, 2005/12/19
Re: gawk number to string bug, David Ellsworth, 2005/12/19
- Re: gawk number to string bug, Paul Eggert, 2005/12/20
- Re: gawk number to string bug, Paul Eggert, 2005/12/21
- Re: gawk number to string bug, Andrew J. Schorr, 2005/12/21
- Re: gawk number to string bug, Andrew J. Schorr, 2005/12/21
- Re: gawk number to string bug, Andrew J. Schorr, 2005/12/21
- Re: gawk number to string bug, Paul Eggert, 2005/12/21
- Re: gawk number to string bug, Andrew J. Schorr, 2005/12/22
- Re: gawk number to string bug, Andrew J. Schorr, 2005/12/23
- Re: gawk number to string bug, Andrew J. Schorr, 2005/12/23
- Re: gawk number to string bug, Andrew J. Schorr, 2005/12/23