How does gmp recognize a signed integer? When I use the gmp library, I can safely put two large positive integers or unsigned integers into the mpz\_ tdiv\_q () function performs division calculation, but I'm curious when I convert two 8-byte memory cells to mpz\_t by using mpz\_roinit\_n() to convert a large negative integers, how does gmp recognize it as a negative number? Can i safely put it into the mpz\_tdiv\_q for division calculation?The large integer inside mpz\_t stores numbers according to the complete storage unit. For example, 120 bits will occupy two consecutive 64 bit storage units. If it is a negative number at this time, do I need to expand its signed bit and then use mpz\_ tdiv\_ q () for division calculation?

```
    uint64_t ext_lhs[2];
    uint64_t ext_rhs[2];
    mpn_copyi(ext_lhs, lhs, 2);
    mpn_copyi(ext_rhs, rhs, 2);
    //sign bit expansion for the highest bit,Is it unnecessary?
    if(overwidth){
        svs_sext_to_bv64x_from_bv64x(ext_lhs, 2, width, lhs, 2 - 1, overwidth);
        svs_sext_to_bv64x_from_bv64x(ext_rhs, 2, width, rhs, 2 - 1, overwidth);
    }
    mpz_t res, left, right;
    mpz_init(res);
    mpz_tdiv_q(res, mpz_roinit_n(left, ext_lhs, 2), mpz_roinit_n(right, ext_rhs, 2));

```