galois.ilog¶
- class galois.ilog(n, b)¶
Finds the integer \(\textrm{log}_b(n) = k\), such that \(b^k \le n\).
- Parameters
- Returns
The integer \(\textrm{log}_b(n) = k\), such that \(b^k \le n\).
- Return type
Examples
In [1]: galois.ilog(27**5 - 1, 27) Out[1]: 4 In [2]: galois.ilog(27**5, 27) Out[2]: 5 In [3]: galois.ilog(27**5 + 1, 27) Out[3]: 5