-
|
What is the difference between bit and bit32 in CraftOS, and is there any plan to add 'bit64' in the future? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
CC used to use Lua 5.1, and so didn't have Lua 5.2 represents all numbers with 64 bit doubles, so can only accurately represent 51-bit integers. We can't have a |
Beta Was this translation helpful? Give feedback.
bit32comes from Lua 5.2, and is the recommended way to perform bit opeations.CC used to use Lua 5.1, and so didn't have
bit32,so had its ownbitlibrary. Nowadays, thebitlibrary is just a copy ofbit32, but with slightly different function names. There's no reason to use this nowadays.Lua 5.2 represents all numbers with 64 bit doubles, so can only accurately represent 51-bit integers. We can't have a
bit64, as it'd produce some nonsense numbers.