10 #if !defined(EXRANDOM_DIGIT_ARITHMETIC_HPP) 11 #define EXRANDOM_DIGIT_ARITHMETIC_HPP 1 37 const int uint_w = std::numeric_limits<uint_t>::digits;
53 {
return x == 0 ? 0 : 1 + highest_bit_idx(x >> 1); }
85 static_assert(
bits != 0,
"base must be 2 or more");
90 #endif // EXRANDOM_DIGIT_ARITHMETIC_HPP Machinery to manipulate bases.
Configuration for exrandom.
static const bool power_of_two
constexpr int highest_bit_idx(unsigned x)
std::uint_fast32_t uint_t
static const uint_t basem1