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

Method SetInt64

bigint.go:877–885  ·  view source on GitHub ↗

SetInt64 calls (big.Int).SetInt64.

(x int64)

Source from the content-addressed store, hash-verified

875
876// SetInt64 calls (big.Int).SetInt64.
877func (z *BigInt) SetInt64(x int64) *BigInt {
878 neg := false
879 if x < 0 {
880 neg = true
881 x = -x
882 }
883 z.updateInnerFromUint64(uint64(x), neg)
884 return z
885}
886
887// SetString calls (big.Int).SetString.
888func (z *BigInt) SetString(s string, base int) (*BigInt, bool) {

Callers 15

setBigWithPowFunction · 0.95
SetStringMethod · 0.95
TestBigIntModSqrtFunction · 0.95
TestDigitsLookupTableFunction · 0.45
initFunction · 0.45
gdaTestFunction · 0.45
NewBigIntFunction · 0.45
bigint_test.goFile · 0.45
TestBigIntModInverseFunction · 0.45
TestBigIntSqrtFunction · 0.45

Calls 1

updateInnerFromUint64Method · 0.95

Tested by 11

TestBigIntModSqrtFunction · 0.76
TestDigitsLookupTableFunction · 0.36
gdaTestFunction · 0.36
TestBigIntModInverseFunction · 0.36
TestBigIntSqrtFunction · 0.36
TestBigIntIssue22830Function · 0.36
TestBigIntGetStringFunction · 0.36
TestBigIntSetStringFunction · 0.36