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

Function ModPow2

mathutil/mersenne/mersenne.go:208–254  ·  view source on GitHub ↗

ModPow2 returns x such that 2^Me % Mm == 2^x. It panics for m < 2. Typical run time is < 1 µs. Use instead of ModPow(2, e, m) wherever possible.

(e, m uint32)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 4

benchmarkModPow2Function · 0.85
TestModPow2Function · 0.85
ModPowFunction · 0.85
ProbablyPrimeFunction · 0.85

Calls

no outgoing calls

Tested by 2

benchmarkModPow2Function · 0.68
TestModPow2Function · 0.68