It turned out to be very simple to address this issue within the current logic of the code. Please try this patch: http://gmplib.org:8000/gmp/raw-rev/ac8585e811a2 -- Torbjörn