Lines Matching refs:mod
32 /* FIXME: Should we implement another sequence to test lucas mod? */
41 mpz_t base, exp, mod;
60 mpz_init (mod);
85 mpz_rrandomb (mod, rands, mod_size);
86 mpz_add_ui (mod, mod, 16);
88 while (mpz_gcd_ui (NULL, mod, Q) != 1);
90 mod_size = mpz_sizeinbase (mod, 2) - 3;
94 mpz_tdiv_q_2exp (exp, mod, exp_size);
105 res = mpz_lucas_mod (t1, r2, Q, exp_size, mod, t2, r1);
110 mpz_add (r2, r2, mod);
111 mpz_powm (r1, base, exp, mod);
118 debug_mp (mod, -16);
130 mpz_clear (mod);