Advertisement
STANAANDREY

logbase

May 2nd, 2020
549
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.11 KB | None | 0 0
  1. #include<cmath>
  2. template<typename tmp>
  3. inline double log_b(tmp b, tmp p)
  4. {
  5.     return log2(p) / log2(b);
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement