Ejemplo n.º 1
0
Archivo: int.go Proyecto: locusf/gmp
// Sign returns:
//
//	-1 if x <  0
//	 0 if x == 0
//	+1 if x >  0
//
func (x *Int) Sign() int {
	x.doinit()
	return int(C._mpz_sgn(&x.i[0]))
}
Ejemplo n.º 2
0
// Sign returns:
//
//	-1 if x <  0
//	 0 if x == 0
//	+1 if x >  0
//
func (z *Int) Sign() int {
	z.doinit()
	return int(C._mpz_sgn(z.ptr))
}
Ejemplo n.º 3
0
Archivo: int.go Proyecto: ncw/gmp
// Sign returns:
//
//	-1 if x <  0
//	 0 if x == 0
//	+1 if x >  0
//
func (z *Int) Sign() int {
	z.doinit()
	return int(C._mpz_sgn(&z.i[0]))
}