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