Perhaps we should define a error function similar to the memory allocation functions? Any error GMP detects would by call the error function. A default error function would be in effect until the user selects another function. The error function would be called with some suitable error code from a defined set in gmp.h. -- Torbjörn