just use mpz_mod instead of mpz_mod_near (much faster)