[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Bug in Lua when using signed long
- From: liam mail <liam.list@...>
- Date: Sun, 13 Dec 2009 14:21:24 +0000
So you are saying that a configure script which sets up Lua before compiling the library and does not check that types are large enough to pass a standard type and retrieve the same type is not a bug?
2009/12/13 Florian Weimer <firstname.lastname@example.org>
And what's apparently happening is that 2**63 - 1 has the same
> It's not a bug, it's natural. lua_Number as "double" is 64 bits long,
> part of which is exponent. Redefine lua_Number as "long double" if you
> want it to hold 64-bits integers. AFAIR, you'll also have to redifine
> another constant together with lua_Number.
representation as 2**63, which is -2**63 (mod 2**64). (Just to
clarify, in case this isn't obvious).