Method Gmp.mpz()->sgn() Method sgn int sgn() Description Return the sign of the integer, i.e. 1 for positive numbers and -1 for negative numbers.