// ModInverse sets z to the multiplicative inverse of g in the group ℤ/pℤ // (where p is a prime) and returns z. func (z *Int) ModInverse(g, p *Int) *Int { g.doinit() p.doinit() z.doinit() C.mpz_invert(z.ptr, g.ptr, p.ptr) return z }
// ModInverse sets z to the multiplicative inverse of g in the group ℤ/pℤ (where // p is a prime) and returns z. func (z *Int) ModInverse(g, p *Int) *Int { g.doinit() p.doinit() z.doinit() C.mpz_invert(&z.i[0], &g.i[0], &p.i[0]) return z }