Wee Jin Goh <wjgoh at brookes.ac.uk> writes: I think I may have found a bug with GMP when working with very large numbers. How large is your stack? Please see Q3 under http://swox.com/gmp/#FAQ and see if stack overrun is indeed the problem. -- Torbjörn