Dedekind 0.0.0
A structuralist C++23 Module Library
Loading...
Searching...
No Matches
dedekind::category::CeilLog2< N > Struct Template Referenceexport

\(\lceil \log_2 \rceil\), the bits a positive count's predecessor occupies: a lax monoid homomorphism \((\mathbb{N}_{>0}, \times) \to (\mathbb{N}, +)\), \(\lceil \log_2 ab \rceil \le \lceil \log_2 a \rceil + \lceil \log_2 b \rceil\), carrying the power action, \(\lceil \log_2 b^e \rceil \le e \lceil \log_2 b \rceil\). The inequality is the soundness of reading a count's width off its factors. More...

Public Types

using Domain = N
using Codomain = std::size_t

Public Member Functions

constexpr std::size_t operator() (N b) const

Detailed Description

template<IsCountWord N = std::size_t>
struct dedekind::category::CeilLog2< N >

\(\lceil \log_2 \rceil\), the bits a positive count's predecessor occupies: a lax monoid homomorphism \((\mathbb{N}_{>0}, \times) \to (\mathbb{N}, +)\), \(\lceil \log_2 ab \rceil \le \lceil \log_2 a \rceil + \lceil \log_2 b \rceil\), carrying the power action, \(\lceil \log_2 b^e \rceil \le e \lceil \log_2 b \rceil\). The inequality is the soundness of reading a count's width off its factors.

Template Parameters
Nthe counts.

The documentation for this struct was generated from the following file: