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

Method MathBigInt

bigint.go:1018–1026  ·  view source on GitHub ↗

apd.BigInt / math/big.Int interop // MathBigInt returns the math/big.Int representation of z.

()

Source from the content-addressed store, hash-verified

1016
1017// MathBigInt returns the math/big.Int representation of z.
1018func (z *BigInt) MathBigInt() *big.Int {
1019 var tmp1 big.Int //gcassert:noescape
1020 zi := z.inner(&tmp1)
1021 // NOTE: We can't return zi directly, because it may be pointing into z's
1022 // _inline array. We have disabled escape analysis for such aliasing, so
1023 // this would be unsafe as it would not force the receiver to escape and
1024 // could leave the return value pointing into stack memory.
1025 return new(big.Int).Set(zi)
1026}
1027
1028// SetMathBigInt sets z to x and returns z.
1029func (z *BigInt) SetMathBigInt(x *big.Int) *BigInt {

Callers 1

Calls 2

innerMethod · 0.95
SetMethod · 0.45

Tested by 1