lua-users home
lua-l archive

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


On Wednesday, August 14, 2013 09:24:40 AM Roberto Ierusalimschy wrote:
> Of course, the library could have a different name. The main problem
> is that the integer size in luaconf.h does not change the fact that,
> internally, Lua (up to 5.2) works with floatint-point double numbers,
> which have only 53 significant bits. So, even with a 64-bit integer
> size, the library would not be able to manipulate 64-bit quantities.
> (And it would be strange a 'bit53' library :)

This discussion is for 5.3work1 so we can assume Lua is able to manipulate 64-
bit integer values.

Programs written with 32-bit operations would not work with a 64-bit library, 
so both would need to be provided. I'm sure the name "bit32" was chosen to 
anticipate this. So lbitlib.c could be made to generate both a bit32 and a 
bit64 (if the integer size is large enough) library with some macros and self-
include.

-- 
tom <telliamed@whoopdedo.org>