I have written an implementation of Toom multiplication with GMP. I tested multiplication of 2 numbers of around 7000 digits (23,000 bits) and it worked perfectly. However when I tried it with 70000 digits (230,000 bits) the program started producing wrong answers.
I am using a 32 bit system. Could GMP run out of memory to use? I did not get any error so I think this is unlikely. If this is not the case I suspect some loss of precision somewhere.