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

Function PowerizeBigInt

mathutil/mathutil.go:399–451  ·  view source on GitHub ↗

PowerizeBigInt returns (e, p) such that e is the smallest number for which p == b^e is greater or equal n. For n < 0 or b < 2 (0, nil) is returned. NOTE: Run time for large values of n (above about 2^1e6 ~= 1e300000) can be significant and/or unacceptabe. For any smaller values of n the function t

(b, n *big.Int)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 3

TestPowerizeBigIntFunction · 0.85
benchmarkPowerizeBigIntFunction · 0.85
PowerizeUint32BigIntFunction · 0.85

Calls 3

CmpMethod · 0.80
SetMethod · 0.65
MulMethod · 0.45

Tested by 2

TestPowerizeBigIntFunction · 0.68
benchmarkPowerizeBigIntFunction · 0.68