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

Function init

table.go:36–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34}
35
36func init() {
37 curVal := NewBigInt(1)
38 curExp := new(BigInt)
39 for i := 1; i <= digitsTableSize; i++ {
40 if i > 1 {
41 curVal.Lsh(curVal, 1)
42 }
43
44 elem := &digitsLookupTable[i]
45 elem.digits = int64(len(curVal.String()))
46
47 elem.border.SetInt64(10)
48 curExp.SetInt64(elem.digits)
49 elem.border.Exp(&elem.border, curExp, nil)
50 elem.nborder.Neg(&elem.border)
51 }
52}
53
54// NumDigits returns the number of decimal digits of d.Coeff.
55//

Callers

nothing calls this directly

Calls 7

LshMethod · 0.95
StringMethod · 0.95
NewBigIntFunction · 0.85
setBigWithPowFunction · 0.85
SetInt64Method · 0.45
ExpMethod · 0.45
NegMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…