示例#1
0
文件: gogmp.go 项目: i-neda/gogmp
func (q *Rat) Mul(x, y *Rat) *Rat {
	x.doinit()
	y.doinit()
	q.doinit()
	C.mpq_mul(&q.i[0], &x.i[0], &y.i[0])
	return q
}
示例#2
0
文件: rat.go 项目: ncw/gmp
// Mul sets z to the product x*y and returns z.
func (z *Rat) Mul(x, y *Rat) *Rat {
	x.doinit()
	y.doinit()
	z.doinit()
	C.mpq_mul(&z.i[0], &x.i[0], &y.i[0])
	return z
}