Hi again, the documentation of mpz_urandomm does not specify what should be done with a negative operand. In practice, it seems to crash. There is already a commented "FIXME" in the code for the case of 0. Regards, Damien