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

Method Set

bigint.go:837–847  ·  view source on GitHub ↗

Set calls (big.Int).Set.

(x *BigInt)

Source from the content-addressed store, hash-verified

835
836// Set calls (big.Int).Set.
837func (z *BigInt) Set(x *BigInt) *BigInt {
838 if x.isInline() {
839 *z = *x
840 return z
841 }
842 var tmp1, tmp2 big.Int //gcassert:noescape
843 zi := z.inner(&tmp1)
844 zi.Set(x.inner(&tmp2))
845 z.updateInner(zi)
846 return z
847}
848
849// SetBit calls (big.Int).SetBit.
850func (z *BigInt) SetBit(x *BigInt, i int, b uint) *BigInt {

Callers 15

TestBigIntSetZFunction · 0.95
TestBigIntAbsZFunction · 0.95
TestBigIntCmpAbsFunction · 0.95
testModSqrtFunction · 0.95
integerPowerMethod · 0.95
CmpMethod · 0.95
newLoopMethod · 0.45
doneMethod · 0.45
RoundMethod · 0.45
BenchmarkGDAFunction · 0.45
gdaTestFunction · 0.45
MathBigIntMethod · 0.45

Calls 3

innerMethod · 0.95
updateInnerMethod · 0.95
isInlineMethod · 0.80

Tested by 12

TestBigIntSetZFunction · 0.76
TestBigIntAbsZFunction · 0.76
TestBigIntCmpAbsFunction · 0.76
testModSqrtFunction · 0.76
BenchmarkGDAFunction · 0.36
gdaTestFunction · 0.36
checkQuoFunction · 0.36
testBitFunSelfFunction · 0.36
testBitsetFunction · 0.36
testGcdFunction · 0.36
TestNewWithBigIntFunction · 0.36