25#ifndef _gcem_factorial_HPP
26#define _gcem_factorial_HPP
42 return( x == T(2) ? T(2) : x == T(3) ? T(6) :
43 x == T(4) ? T(24) : x == T(5) ? T(120) :
44 x == T(6) ? T(720) : x == T(7) ? T(5040) :
45 x == T(8) ? T(40320) : x == T(9) ? T(362880) :
47 x == T(10) ? T(3628800) :
48 x == T(11) ? T(39916800) :
49 x == T(12) ? T(479001600) :
50 x == T(13) ? T(6227020800) :
51 x == T(14) ? T(87178291200) :
52 x == T(15) ? T(1307674368000) :
56template<typename T, typename std::enable_if<std::is_integral<T>::value>
::type* =
nullptr>
62 return( x == T(0) ? T(1) :
72template<typename T, typename std::enable_if<!std::is_integral<T>::value>
::type* =
nullptr>
type
Definition: core.h:556
constexpr T factorial_recur(const T x) noexcept
Definition: factorial.hpp:59
constexpr T factorial_table(const T x) noexcept
Definition: factorial.hpp:39
Definition: is_even.hpp:29
constexpr T factorial(const T x) noexcept
Compile-time factorial function.
Definition: factorial.hpp:95
constexpr return_t< T > tgamma(const T x) noexcept
Compile-time gamma function.
Definition: tgamma.hpp:80