13 unsigned int gcd(
unsigned int a,
unsigned int b)
15 require(b,
"gcd: rhs cannot be zero");
28 unsigned int lcm(
unsigned int a,
unsigned int b)
30 return a /
gcd(a, b) *
b;
ATTRIBUTE_PURE unsigned int gcd(unsigned int a, unsigned int b)
Greatest common divisor.
weightset_mixin< detail::b_impl > b
Provide a variadic mul on top of a binary mul(), and one().
void require(bool b, Args &&...args)
If b is not verified, raise an error with args as message.
ATTRIBUTE_PURE unsigned int lcm(unsigned int a, unsigned int b)
Lowest common multiple.