MySQL 9.6.0
Source Code Documentation
mysql::math::detail Namespace Reference

Functions

template<auto base, unsigned bound, std::unsigned_integral Value_t>
requires std::same_as<decltype(base), Value_t> && (base >= 2)
constexpr unsigned int_log_helper (Value_t value)
 Return the base-base logarithm of value, assuming that value < pow(base, 2 * bound), where bound is a power of two. More...
 

Function Documentation

◆ int_log_helper()

template<auto base, unsigned bound, std::unsigned_integral Value_t>
requires std::same_as<decltype(base), Value_t> && (base >= 2)
constexpr unsigned mysql::math::detail::int_log_helper ( Value_t  value)
constexpr

Return the base-base logarithm of value, assuming that value < pow(base, 2 * bound), where bound is a power of two.

Template Parameters
Value_tData type
baseThe base of the logarithm.
boundPower of two, such that value < pow(base, 2 * bound).
Parameters
valueValue to test.
Returns
the base-base logarithm of value.