45template <
typename B,
typename E,
46 std::enable_if_t<std::is_integral_v<E>,
void*> =
nullptr>
47constexpr auto pow(B base, E
exp) -> B {
48 if constexpr (std::is_signed_v<E>) {
69 std::enable_if_t<std::is_floating_point_v<T>,
void*> =
nullptr>
70constexpr auto pow(T base, T
exp) -> T {
71 return ::num_collect::constants::exp(
exp *
log(base));
Definition of exp function.
Definition of log function.
constexpr auto pow_pos_int(T base, I exp) -> T
Calculate the value of base raised to the power exp.
Namespace of constexpr variables and functions.
constexpr auto exp(T x) -> T
Calculate exponential function .
constexpr auto log(T x) -> T
Calculate logarithm .
constexpr auto pow(B base, E exp) -> B
Calculate power .
Definition of pow_pos_int function.