MCPcopy Create free account
hub / github.com/andeya/algorithm / ToBase

Function ToBase

mathutil/mathutil.go:805–829  ·  view source on GitHub ↗

ToBase produces n in base b. For example ToBase(2047, 22) -> [1, 5, 4] 1 * 22^0 1 5 * 22^1 110 4 * 22^2 1936 ---- 2047 ToBase panics for bases < 2.

(n *big.Int, b int)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

TestToBaseFunction · 0.85

Calls 3

Int64Method · 0.80
SetMethod · 0.65
NegMethod · 0.45

Tested by 1

TestToBaseFunction · 0.68