KFR

Exponential, logarithm and power functions

exp

template<typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
flt_type<T1> exp(const T1 &x)

Returns e raised to the given power x.

Source:

template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
KFR_FUNC flt_type<T1> exp(const T1& x)
template<typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
internal::expression_function<fn::exp, E1> exp(E1 &&x)

Returns e raised to the given power x. Version that accepts and returns expressions.

Source:

template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
KFR_FUNC internal::expression_function<fn::exp, E1> exp(E1&& x)

exp2

template<typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
flt_type<T1> exp2(const T1 &x)

Returns 2 raised to the given power x.

Source:

template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
KFR_FUNC flt_type<T1> exp2(const T1& x)
template<typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
internal::expression_function<fn::exp2, E1> exp2(E1 &&x)

Returns 2 raised to the given power x. Version that accepts and returns expressions.

Source:

template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
KFR_FUNC internal::expression_function<fn::exp2, E1> exp2(E1&& x)

exp10

template<typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
flt_type<T1> exp10(const T1 &x)

Returns 10 raised to the given power x.

Source:

template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
KFR_FUNC flt_type<T1> exp10(const T1& x)
template<typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
internal::expression_function<fn::exp10, E1> exp10(E1 &&x)

Returns 10 raised to the given power x. Version that accepts and returns expressions.

Source:

template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
KFR_FUNC internal::expression_function<fn::exp10, E1> exp10(E1&& x)

log

template<typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
flt_type<T1> log(const T1 &x)

Returns the natural logarithm of the x.

Source:

template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
KFR_FUNC flt_type<T1> log(const T1& x)
template<typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
internal::expression_function<fn::log, E1> log(E1 &&x)

Returns the natural logarithm of the x. Version that accepts and returns expressions.

Source:

template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
KFR_FUNC internal::expression_function<fn::log, E1> log(E1&& x)

log2

template<typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
flt_type<T1> log2(const T1 &x)

Returns the binary (base-2) logarithm of the x.

Source:

template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
KFR_FUNC flt_type<T1> log2(const T1& x)
template<typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
internal::expression_function<fn::log2, E1> log2(E1 &&x)

Returns the binary (base-2) logarithm of the x. Version that accepts and returns expressions.

Source:

template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
KFR_FUNC internal::expression_function<fn::log2, E1> log2(E1&& x)

log10

template<typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
flt_type<T1> log10(const T1 &x)

Returns the common (base-10) logarithm of the x.

Source:

template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
KFR_FUNC flt_type<T1> log10(const T1& x)
template<typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
internal::expression_function<fn::log10, E1> log10(E1 &&x)

Returns the common (base-10) logarithm of the x. Version that accepts and returns expressions.

Source:

template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
KFR_FUNC internal::expression_function<fn::log10, E1> log10(E1&& x)

logb

template<typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
flt_type<T1> logb(const T1 &x)

Returns the rounded binary (base-2) logarithm of the x.

Source:

template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
KFR_FUNC flt_type<T1> logb(const T1& x)
template<typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
internal::expression_function<fn::logb, E1> logb(E1 &&x)

Returns the rounded binary (base-2) logarithm of the x. Version that accepts and returns expressions.

Source:

template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
KFR_FUNC internal::expression_function<fn::logb, E1> logb(E1&& x)

logn

template<typename T1, typename T2, KFR_ENABLE_IF(is_numeric_args<T1, T2>::value)>
flt_type<common_type<T1, T2>> logn(const T1 &x, const T2 &y)

Returns the logarithm of the x with base y.

Source:

template <typename T1, typename T2, KFR_ENABLE_IF(is_numeric_args<T1, T2>::value)>
KFR_FUNC flt_type<common_type<T1, T2>> logn(const T1& x, const T2& y)
template<typename E1, typename E2, KFR_ENABLE_IF(is_input_expressions<E1, E2>::value)>
internal::expression_function<fn::logn, E1, E2> logn(E1 &&x, E2 &&y)

Returns the logarithm of the x with base y. Version that accepts and returns expressions.

Source:

template <typename E1, typename E2, KFR_ENABLE_IF(is_input_expressions<E1, E2>::value)>
KFR_FUNC internal::expression_function<fn::logn, E1, E2> logn(E1&& x, E2&& y)

logm

template<typename T1, typename T2, KFR_ENABLE_IF(is_numeric_args<T1, T2>::value)>
flt_type<common_type<T1, T2>> logm(const T1 &x, const T2 &y)

Returns log(x) * y.

Source:

template <typename T1, typename T2, KFR_ENABLE_IF(is_numeric_args<T1, T2>::value)>
KFR_FUNC flt_type<common_type<T1, T2>> logm(const T1& x, const T2& y)
template<typename E1, typename E2, KFR_ENABLE_IF(is_input_expressions<E1, E2>::value)>
internal::expression_function<fn::logm, E1, E2> logm(E1 &&x, E2 &&y)

Returns log(x) * y. Version that accepts and returns expressions.

Source:

template <typename E1, typename E2, KFR_ENABLE_IF(is_input_expressions<E1, E2>::value)>
KFR_FUNC internal::expression_function<fn::logm, E1, E2> logm(E1&& x, E2&& y)

exp_fmadd

template<typename T1, typename T2, typename T3, KFR_ENABLE_IF(is_numeric_args<T1, T2, T3>::value)>
flt_type<common_type<T1, T2, T3>> exp_fmadd(const T1 &x, const T2 &y, const T3 &z)

Returns exp(x * m + a).

Source:

template <typename T1, typename T2, typename T3, KFR_ENABLE_IF(is_numeric_args<T1, T2, T3>::value)>
KFR_FUNC flt_type<common_type<T1, T2, T3>> exp_fmadd(const T1& x, const T2& y, const T3& z)
template<typename E1, typename E2, typename E3, KFR_ENABLE_IF(is_input_expressions<E1, E2, E3>::value)>
internal::expression_function<fn::exp_fmadd, E1, E2, E3> exp_fmadd(E1 &&x, E2 &&y, E3 &&z)

Returns exp(x * m + a). Version that accepts and returns expressions.

Source:

template <typename E1, typename E2, typename E3, KFR_ENABLE_IF(is_input_expressions<E1, E2, E3>::value)>
KFR_FUNC internal::expression_function<fn::exp_fmadd, E1, E2, E3> exp_fmadd(E1&& x, E2&& y, E3&& z)

log_fmadd

template<typename T1, typename T2, typename T3, KFR_ENABLE_IF(is_numeric_args<T1, T2, T3>::value)>
flt_type<common_type<T1, T2, T3>> log_fmadd(const T1 &x, const T2 &y, const T3 &z)

Returns log(x) * m + a.

Source:

template <typename T1, typename T2, typename T3, KFR_ENABLE_IF(is_numeric_args<T1, T2, T3>::value)>
KFR_FUNC flt_type<common_type<T1, T2, T3>> log_fmadd(const T1& x, const T2& y, const T3& z)
template<typename E1, typename E2, typename E3, KFR_ENABLE_IF(is_input_expressions<E1, E2, E3>::value)>
internal::expression_function<fn::log_fmadd, E1, E2, E3> log_fmadd(E1 &&x, E2 &&y, E3 &&z)

Returns log(x) * m + a. Version that accepts and returns expressions.

Source:

template <typename E1, typename E2, typename E3, KFR_ENABLE_IF(is_input_expressions<E1, E2, E3>::value)>
KFR_FUNC internal::expression_function<fn::log_fmadd, E1, E2, E3> log_fmadd(E1&& x, E2&& y, E3&& z)

pow

template<typename T1, typename T2, KFR_ENABLE_IF(is_numeric_args<T1, T2>::value)>
flt_type<common_type<T1, T2>> pow(const T1 &x, const T2 &y)

Returns the x raised to the given power y.

Source:

template <typename T1, typename T2, KFR_ENABLE_IF(is_numeric_args<T1, T2>::value)>
KFR_FUNC flt_type<common_type<T1, T2>> pow(const T1& x, const T2& y)
template<typename E1, typename E2, KFR_ENABLE_IF(is_input_expressions<E1, E2>::value)>
internal::expression_function<fn::pow, E1, E2> pow(E1 &&x, E2 &&y)

Returns the x raised to the given power y. Version that accepts and returns expressions.

Source:

template <typename E1, typename E2, KFR_ENABLE_IF(is_input_expressions<E1, E2>::value)>
KFR_FUNC internal::expression_function<fn::pow, E1, E2> pow(E1&& x, E2&& y)

root

template<typename T1, typename T2, KFR_ENABLE_IF(is_numeric_args<T1, T2>::value)>
flt_type<common_type<T1, T2>> root(const T1 &x, const T2 &y)

Returns the real nth root of the x.

Source:

template <typename T1, typename T2, KFR_ENABLE_IF(is_numeric_args<T1, T2>::value)>
KFR_FUNC flt_type<common_type<T1, T2>> root(const T1& x, const T2& y)
template<typename E1, typename E2, KFR_ENABLE_IF(is_input_expressions<E1, E2>::value)>
internal::expression_function<fn::root, E1, E2> root(E1 &&x, E2 &&y)

Returns the real nth root of the x. Version that accepts and returns expressions.

Source:

template <typename E1, typename E2, KFR_ENABLE_IF(is_input_expressions<E1, E2>::value)>
KFR_FUNC internal::expression_function<fn::root, E1, E2> root(E1&& x, E2&& y)

cbrt

template<typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
flt_type<T1> cbrt(const T1 &x)

Returns the cube root of the x.

Source:

template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
KFR_FUNC flt_type<T1> cbrt(const T1& x)
template<typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
internal::expression_function<fn::cbrt, E1> cbrt(E1 &&x)

Returns the cube root of the x. Version that accepts and returns expressions.

Source:

template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
KFR_FUNC internal::expression_function<fn::cbrt, E1> cbrt(E1&& x)