Example #1
0
// CmpInt compares x and y. The result is
//
//   neg if x <  y
//    0 if x == y
//   pos if x >  y
//
func CmpFloat(x, y *Float) int {
	x.doinit()
	y.doinit()
	return int(C.mpf_cmp(&x.i[0], &y.i[0]))
}
Example #2
0
func (f *Float) Cmp(y *Float) int {
	return int(C.mpf_cmp(&f.i[0], &y.i[0]))
}