refactor mpq / mpz, mpz / mpq