Exemplo n.º 1
0
Arquivo: rat.go Projeto: ncw/gmp
// Sign returns:
//
//	-1 if z <  0
//	 0 if z == 0
//	+1 if z >  0
//
func (z *Rat) Sign() int {
	z.doinit()
	return int(C.__mpq_sgn(&z.i[0]))
}
Exemplo n.º 2
0
Arquivo: rat.go Projeto: locusf/gmp
// Sign returns:
//
//	-1 if x <  0
//	 0 if x == 0
//	+1 if x >  0
//
func (x *Rat) Sign() int {
	x.doinit()
	return int(C.__mpq_sgn(&x.i[0]))
}