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

Function Log2Uint16

mathutil/mathutil.go:179–185  ·  view source on GitHub ↗

Log2Uint16 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 uint16)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

TestLog2Function · 0.85
BenchmarkLog2Uint16Function · 0.85

Calls

no outgoing calls

Tested by 2

TestLog2Function · 0.68
BenchmarkLog2Uint16Function · 0.68