5#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_MATH_GCD_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_MATH_GCD_HPP_
13#include "arene/base/stdlib_choice/enable_if.hpp"
14#include "arene/base/stdlib_choice/is_integral.hpp"
25template <typename Integral, constraints<std::enable_if_t<std::is_integral<Integral>::value> > =
nullptr>
26constexpr auto gcd(Integral lhs, Integral rhs)
noexcept -> Integral {
27 while (rhs != Integral{}) {
28 Integral tmp{lhs % rhs};
Definition accumulate.hpp:37
constexpr auto abs(Number value) noexcept -> Number
Calculate the absolute value of a number.
Definition abs.hpp:46
constexpr auto gcd(Integral lhs, Integral rhs) noexcept -> Integral
Calculates the Greatest Common Divisor (GCD) of two Integral values.
Definition gcd.hpp:26
Definition accumulate.hpp:36