I have solved my own problem with this: void mpz_set_uj(mpz_t x, unsigned long long y) { mpz_import(x,sizeof(unsigned long long),-1,1,0,0,&y); } (but I still need the mpz_add_uj and mpz_mul_uj functions.) Keith