[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Possible Bug in bitlib under Windows?
- From: "Doug Currie" <doug.currie@...>
- Date: Fri, 12 Dec 2008 15:58:30 -0500
On Fri, Dec 12, 2008 at 2:58 PM, David Manura <email@example.com> wrote:
Something like this has been reported before--see the "Plea" written
On Fri, Dec 12, 2008 at 2:11 PM, KHMan <firstname.lastname@example.org
> So at this point, I think we've pretty much
> exhausted the guessing bit and some debugging is necessary.
by someone in http://lua-users.org/wiki/BitwiseOperators .
I am the author of the plea. The issue of 0xffffffff turning into -2147483648 is only orthogonally related. I suspect this stems from a double to int32_t conversion. Since 0x0000ffffffff is outside the range of int32_t the conversion is returning an "integer NaN." In other words, the conversion is assumed to be signed, whereas the value you "want" is unsigned.