[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: bitop multiplication overflow semantics
- From: Cosmin Apreutesei <cosmin.apreutesei@...>
- Date: Mon, 21 Jan 2013 14:34:24 +0200
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.