func (q *Rat) Div(x, y *Rat) *Rat { x.doinit() y.doinit() q.doinit() C.mpq_div(&q.i[0], &x.i[0], &y.i[0]) return q }
// Quo sets z to the quotient x/y and returns z. // If y == 0, a division-by-zero run-time panic occurs. func (z *Rat) Quo(x, y *Rat) *Rat { x.doinit() y.doinit() z.doinit() if y.Sign() == 0 { panic("division by zero") } C.mpq_div(&z.i[0], &x.i[0], &y.i[0]) return z }