folly::constexpr_pow

constexpr_pow overloads

Synopses

Declared in <folly/ConstexprMath.h>

Calculate an approximation of base raised to a floating-point exponent.

template<typename T>
requires std::floating_point<T>
constexpr
T
constexpr_pow(
    T const base,
    T const exp);
» more...

constexpr_pow

template<
    typename T,
    typename E>
requires (std::integral<E> && !std::same_as<E, bool>)
constexpr
T
constexpr_pow(
    T const base,
    E const exp);
» more...

Return Value

An approximation of base raised to exp.

Parameters

NameDescription
baseThe base value.
expThe floating-point exponent.