Found an undocumented math.random feature: math.random(0) return 64 bits random (signed) integer (instead of producing an error) However, on my machine, it does not equal to math.random(math.mininteger, math.maxinteger)