Data update

This commit is contained in:
Ingy döt Net 2025-08-11 18:05:26 -07:00
parent 4d5544505c
commit 4924dd0264
3073 changed files with 55820 additions and 4408 deletions

View file

@ -0,0 +1,20 @@
-- Rotate left and right are not built-in but we use the
-- same 32-bit substitutes as in the Lua 5.3+ example.
local function rl(x, y) return ((x << y) & 0xffffffff) | (x >> (32 - y)) end
local function rr(x, y) return (x >> y) | ((x << (32 - y)) & 0xffffffff) end
local function bitwise(x, y)
print($" x = {x}")
print($" y = {y}")
print($" x & y = {x & y}")
print($" x | y = {x | y}")
print($" x ~ y = {x ~ y}")
print($"~x = {~x}")
print($" x << y = {x << y}")
print($" x >> y = {x >> y}")
print($" x rl y = {rl(x, y)}")
print($" x rr y = {rr(x, y)}")
end
bitwise(10, 2)