I've written a big-number library for Lua based on the code used in GNU bc.
You can get it at ftp://ftp.tecgraf.puc-rio.br/pub/lhf/bc.tar.gz
Please send comments, suggestions, and bug reports to lhf@tecgraf.puc-rio.br .
Enjoy.
--lhf