template <size_t B, class D>
constexpr basic_integer<B * 2, D, false> lcm(
const basic_integer<B, D, false>& lhs,
const basic_integer<B, D, false>& rhs
) noexcept;
constexpr since C++14
Calculates least common multiple of two integers.
Example
#include "fwnbi.hpp"
#include <iostream>
using namespace fwnbi::literals;
int main() {
std::cout << "lcm(21, 6) = " << fwnbi::lcm(21_ull128, 6_ull128) << '\n';
}
Output
lcm(21, 6) = 42