int64 result is error
a-b=0???

how to increase size to 32 simbols?
hello? creators ? little bird needs you
Maybe use BigNum library? Like this one https://github.com/user-none/lua-nums ?
Really strange to post textual question using image. Distasteful.
You can use ffi to workaround big integer issue. It should be easier than using a big number library.
ffi=require'ffi' a=ffi.new('uint64_t', 9223372036854775807ull) =a 9223372036854775807ULL b=ffi.new('uint64_t', 9223372036854775806ull) =b 9223372036854775806ULL c=a-b =c 1ULL d=c =d 1ULL =tonumber(d) 1
Actually, you don't need to use the ffi function directly. LuaJIT does the boxing/unboxing automatically. Just need to tell it's a long number by appending the "ll" modifer.
a=9223372036854775807ll b=9223372036854775806ll =a-b 1LL
Actually, you don't need to use the ffi function directly. LuaJIT does the boxing/unboxing automatically. Just need to tell it's a long number by appending the "ll" modifer.
a=9223372036854775807ll b=9223372036854775806ll =a-b 1LL
no, this way is not good,i just want to use int64 without ll, and can use tostring,can u tell me how to compile luajit for int64 ?
i just want to use int64 without ll
Unfortunately, you cannot do that. Lua can only store 64-bit integers up to 2^53. With LuaJIT, it automatically boxes 64-bit values in CDATA object when it detects the "ll" or "ull" modifiers.
can u tell me how to compile luajit for int64 ?
Don't understand your question. There is no special compile options for int64. Just use the standard source code and compile for your platform.
i just want to use int64 without ll
Unfortunately, you cannot do that. Lua can only store 64-bit integers up to 2^53. With LuaJIT, it automatically boxes 64-bit values in CDATA object when it detects the "ll" or "ull" modifiers.
can u tell me how to compile luajit for int64 ?
Don't understand your question. There is no special compile options for int64. Just use the standard source code and compile for your platform.
omg,i don't want to use C# to wrapper my API...
can luajit2's developer can do it ?