MCPcopy Create free account
hub / github.com/cockroachdb/apd / Quo

Method Quo

bigint.go:752–766  ·  view source on GitHub ↗

Quo calls (big.Int).Quo.

(x, y *BigInt)

Source from the content-addressed store, hash-verified

750
751// Quo calls (big.Int).Quo.
752func (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.
769func (z *BigInt) QuoRem(x, y, r *BigInt) (*BigInt, *BigInt) {

Callers 9

TestBigIntNoNegativeZeroFunction · 0.95
ModfMethod · 0.95
roundAddOneFunction · 0.45
RunMethod · 0.45
TestBigIntDivisionSignsFunction · 0.45
ExampleContext_inexactFunction · 0.45
ExampleErrDecimalFunction · 0.45
TestQuoErrFunction · 0.45

Calls 5

updateInnerFromUint64Method · 0.95
innerMethod · 0.95
updateInnerMethod · 0.95
quoInlineFunction · 0.85
innerAsUint64Method · 0.80

Tested by 7

TestBigIntNoNegativeZeroFunction · 0.76
RunMethod · 0.36
TestBigIntDivisionSignsFunction · 0.36
ExampleContext_inexactFunction · 0.36
ExampleErrDecimalFunction · 0.36
TestQuoErrFunction · 0.36