31#ifndef ETL_LCM_INCLUDED
32#define ETL_LCM_INCLUDED
37#include "static_assert.h"
46 template <
intmax_t Value1,
intmax_t Value2>
60 lcm(
T a,
T b) ETL_NOEXCEPT
71 return a * (
b / gcd(a,
b));
83 lcm(
T a,
T b) ETL_NOEXCEPT
89 utype ua = etl::absolute_unsigned(a);
90 utype ub = etl::absolute_unsigned(
b);
92 return static_cast<T>(lcm(
ua,
ub));
96 #if ETL_HAS_INITIALIZER_LIST
102 template<
typename T,
typename...
TRest>
109 for (
T value : {
rest...})
111 result = lcm(result, value);
129 template<
typename T,
typename...
TRest>
enable_if
Definition type_traits_generator.h:1254
is_integral
Definition type_traits_generator.h:1064
make_unsigned
Definition type_traits_generator.h:1244
bitset_ext
Definition absolute.h:39
ETL_NODISCARD ETL_CONSTEXPR14 T round_half_even_unscaled(T value) ETL_NOEXCEPT
Definition scaled_rounding.h:315