In Lua memory, it's gonna be ok since it's kept in double (precise to 2^53), but when you setStorage, it is cast to int32, which cannot store more than 2,147,483,647, and 1,762,329,091,215 is bigger than that.
There is a ton of conditions already in your engine, you just repeat the pattern and...