3#ifndef TETL_NUMERIC_LCM_HPP
4#define TETL_NUMERIC_LCM_HPP
6#include <etl/_numeric/gcd.hpp>
7#include <etl/_type_traits/common_type.hpp>
8#include <etl/_type_traits/is_integral.hpp>
9#include <etl/_type_traits/is_same.hpp>
19template <
typename M,
typename N>
20 requires(is_integral_v<M>
and not is_same_v<M,
bool>
and is_integral_v<N>
and not is_same_v<N,
bool>)
21[[nodiscard]]
constexpr auto lcm(M m, N n) -> common_type_t<M, N>
23 return (m * n) / gcd(m, n);
constexpr auto lcm(M m, N n) -> common_type_t< M, N >
Computes the least common multiple of the integers m and n.
Definition lcm.hpp:21
Definition adjacent_find.hpp:9