A library mod that adds a data type for arbitrary precision integers.
I did not write this code; it came from here. I made two tiny changes to make it work with Minetest.
The documentation can be found here.
A library that adds a data type for arbitrary precision integers