I have data in mpz_t
and I want to assign that data to int
or unsigned long int
. The data/numbers are small in mpz_t
and can be stored into in back. Is there a way I can accomplish this?
Asked
Active
Viewed 1,171 times
-1

Waqar
- 8,558
- 4
- 35
- 43

Muhammad Iqbal
- 67
- 9
1 Answers
1
Assuming you are referring to mpz_t
from gmp(gnu multi-precision) library, you can do the conversion using:
unsigned long int mpz_get_ui (const mpz_t op)

Waqar
- 8,558
- 4
- 35
- 43