lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Fri, Feb 7, 2020 at 1:35 PM Hisham wrote:
Is this the only difference
you are aware of?


LuaJIT has a quirk with converting out-of-range values
from "double" to "int64":
For example, bit.bor(2^64, 0LL) is negative
Another example (convert -1.0 to uint64):
for j = 0, 100 do
   local m1 = #{j} * (-1)       -- minus one of type "double"
   local zero = bit.bor(m1, 0ULL) + 1 -- must be zero, but...
   if j % 100 == 0 then print(zero) end
end