why lua bit.lshift(1, 40) is 256, not 1099511627776
I tried left-shift in python and lua, but get different result lua print(bit.lshift(1, 40)) –> 256 python 1 << 40 –> 1099511627776 >Solution : That’s because bit.lshift uses 32 bits (assuming this is the bitop library running under PUC Lua 5.1 / LuaJIT): It’s desirable to define semantics that work the same across all platforms.… Read More why lua bit.lshift(1, 40) is 256, not 1099511627776