Hi List, In Lua-5.1.4 macro #define ceillog2(x) (luaO_log2((x)-1) + 1) gives wrong answer when x is 0. ceillog2(0) => 32 (should be 1).