pub const fn log3_strict_usize(n: usize) -> usizeExpand description
Computes the strict base-3 logarithm of n.
Returns k such that 3^k == n. Panics if n is not a power of 3.
This is the base-3 analogue of log2_strict_usize.
§Arguments
n- A positive integer that must be a power of 3 (i.e., 1, 3, 9, 27, 81, …).
§Returns
The exponent k where 3^k == n.
§Panics
Panics if:
nis zeronis not a power of 3