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

Function Log2Uint64

mathutil/mathutil.go:207–237  ·  view source on GitHub ↗

Log2Uint64 returns log base 2 of n. It's the same as index of the highest bit set in n. For n == 0 -1 is returned.

(n uint64)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

TestLog2Function · 0.85
BenchmarkLog2Uint64Function · 0.85

Calls

no outgoing calls

Tested by 2

TestLog2Function · 0.68
BenchmarkLog2Uint64Function · 0.68