lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

* GrayFace:

> 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.

And what's apparently happening is that 2**63 - 1 has the same
representation as 2**63, which is -2**63 (mod 2**64).  (Just to
clarify, in case this isn't obvious).