Date: Wed, 14 Jan 2026 19:32:37 +0100
> On 14 Jan 2026, at 19:05, Sebastian Wittmeier via Std-Proposals <std-proposals_at_[hidden]> wrote:
>
> So your code works efficiently with any modulus? (Even non-power of 2)?
Indeed:
The idea is first to find an efficient implementation for the 2⁽2^k) words in this proposal:
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3161r4.html
Then, in general modulus, for modular multiplication, choose a word it fits into and use the functions mul_wide and div_wide.
>
> So your code works efficiently with any modulus? (Even non-power of 2)?
Indeed:
The idea is first to find an efficient implementation for the 2⁽2^k) words in this proposal:
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3161r4.html
Then, in general modulus, for modular multiplication, choose a word it fits into and use the functions mul_wide and div_wide.
Received on 2026-01-14 18:32:53
