github.com/liucxer/courier@v1.7.1/h3/math_extensions.go (about) 1 package h3 2 3 func _ipow(base int, exp int) int { 4 result := 1 5 for exp != 0 { 6 if exp&1 != 0 { 7 result *= base 8 } 9 exp >>= uint64(1) 10 base *= base 11 } 12 return result 13 }