GMP Library: unsigned/signed arithmetics

54 Views Asked by At

I am trying to do some computations on big numbers, using the GMP library.

I am trying to understand how could I indicate GMP to use either signed or unsigned arithmetics.

Let's say that I have two "big numbers" (i.e mpz_t variables): a and b. Let's say that I want to compute the multiplication a times b.

How do I specify GMP that a and b must be interpreted as signed or unsigned numbers ? For some operations, like the multiplication, GMP has only one function mpz_mul (mpz_t rop, const mpz_t op1, const mpz_t op2). I was expecting to have one function for unsigned multiplication, and a second one for signed multiplication.

Thanks.

0

There are 0 best solutions below