Quo calls (big.Int).Quo.
(x, y *BigInt)
| 750 | |
| 751 | // Quo calls (big.Int).Quo. |
| 752 | func (z *BigInt) Quo(x, y *BigInt) *BigInt { |
| 753 | if xVal, xNeg, ok := x.innerAsUint64(); ok { |
| 754 | if yVal, yNeg, ok := y.innerAsUint64(); ok { |
| 755 | if quoVal, quoNeg, ok := quoInline(xVal, yVal, xNeg, yNeg); ok { |
| 756 | z.updateInnerFromUint64(quoVal, quoNeg) |
| 757 | return z |
| 758 | } |
| 759 | } |
| 760 | } |
| 761 | var tmp1, tmp2, tmp3 big.Int //gcassert:noescape |
| 762 | zi := z.inner(&tmp1) |
| 763 | zi.Quo(x.inner(&tmp2), y.inner(&tmp3)) |
| 764 | z.updateInner(zi) |
| 765 | return z |
| 766 | } |
| 767 | |
| 768 | // QuoRem calls (big.Int).QuoRem. |
| 769 | func (z *BigInt) QuoRem(x, y, r *BigInt) (*BigInt, *BigInt) { |