QuickCppLib 0.10
Eliminate all the tedious hassle when making state-of-the-art C++ 14 - 23 libraries!
Loading...
Searching...
No Matches
quickcpplib::_xxx::algorithm::prime_modulus::detail Namespace Reference

Functions

template<uint32_t power, class T >
constexpr T mod (T v)
 

Function Documentation

◆ mod()

template<uint32_t power, class T >
constexpr T quickcpplib::_xxx::algorithm::prime_modulus::detail::mod ( v)
inlineconstexpr
183{ return v % twos_power_prime(power); }
constexpr uint64_t twos_power_prime(size_t power) noexcept
Returns a constexpr prime just under a twos power e.g. for 8, you get 251, which is the prime just be...
Definition prime_modulus.hpp:39