lua-users home
lua-l archive

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


Hi,

I wanted to port a hash function from C to LuaJIT. First thing the
algorithm does is it takes the first uint32_t of the key and
multiplies it with 0xcc9e2d51, the destination variable being itself a
uint32_t. I don't know the semantics of this in C, but whatever it is,
can I emulate this in LuaJIT / LuaBitOp or other library? This
multiplication would exceed 53bit if it were between Lua numbers.

Thanks.