Lua 5.1 appears interpret many perfectly valid 64b integers as
1,805,996,217,335,808,768
while the largest signed valid 64b integer is
9,223,372,036,854,775,807
Here is an example of the unfortunate output:
Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio
> return 1805996217335808768 == 1805996217335808804
true
> return 1805996217335808768 == 1805996217335808805
true
> return 1805996217335808768 == 1805996217335808806
true
> return 1805996217335808768 == 1805996217335808769
true
> return 1805996217335808768 == 1805996217335808767
true
One would expect to see a false
everywhere there is a true
here.
Edit (flagged as duplicate):
This is not a duplicate of this question because you cannot compile Lua 5.1 to handle 64b integers.