Skip to content

Exponential/Logarithm and other functions

cbrt function

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

Returns the cube root of the x.

Source code
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>)>
KFR_FUNCTION flt_type<T1> cbrt(const T1& x)
{
    return intrinsics::cbrt(x);
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/log_exp.hpp#L220

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

Returns the cube root of the x. Accepts and returns expressions.

Source code
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>)>
KFR_FUNCTION internal::expression_function<fn::cbrt, E1> cbrt(E1&& x)
{
    return { fn::cbrt(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/log_exp.hpp#L227

exp function

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

Returns e raised to the given power x.

Source code
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>)>
KFR_FUNCTION flt_type<T1> exp(const T1& x)
{
    return intrinsics::exp(x);
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/log_exp.hpp#L37

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

Returns e raised to the given power x. Accepts and returns expressions.

Source code
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>)>
KFR_FUNCTION internal::expression_function<fn::exp, E1> exp(E1&& x)
{
    return { fn::exp(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/log_exp.hpp#L44

exp10 function

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

Returns 10 raised to the given power x.

Source code
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>)>
KFR_FUNCTION flt_type<T1> exp10(const T1& x)
{
    return intrinsics::exp10(x);
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/log_exp.hpp#L65

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

Returns 10 raised to the given power x. Accepts and returns expressions.

Source code
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>)>
KFR_FUNCTION internal::expression_function<fn::exp10, E1> exp10(E1&& x)
{
    return { fn::exp10(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/log_exp.hpp#L72

exp2 function

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

Returns 2 raised to the given power x.

Source code
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>)>
KFR_FUNCTION flt_type<T1> exp2(const T1& x)
{
    return intrinsics::exp2(x);
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/log_exp.hpp#L51

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

Returns 2 raised to the given power x. Accepts and returns expressions.

Source code
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>)>
KFR_FUNCTION internal::expression_function<fn::exp2, E1> exp2(E1&& x)
{
    return { fn::exp2(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/log_exp.hpp#L58

exp_fmadd function

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

Returns exp(x * m + a).

Source code
template <typename T1, typename T2, typename T3, KFR_ENABLE_IF(is_numeric_args<T1, T2, T3>)>
KFR_FUNCTION flt_type<common_type<T1, T2, T3>> exp_fmadd(const T1& x, const T2& y, const T3& z)
{
    return intrinsics::exp_fmadd(x, y, z);
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/log_exp.hpp#L164

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

Returns exp(x * m + a). Accepts and returns expressions.

Source code
template <typename E1, typename E2, typename E3, KFR_ENABLE_IF(is_input_expressions<E1, E2, E3>)>
KFR_FUNCTION internal::expression_function<fn::exp_fmadd, E1, E2, E3> exp_fmadd(E1&& x, E2&& y, E3&& z)
{
    return { fn::exp_fmadd(), std::forward<E1>(x), std::forward<E2>(y), std::forward<E3>(z) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/log_exp.hpp#L171

log function

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

Returns the natural logarithm of the x.

Source code
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>)>
KFR_FUNCTION flt_type<T1> log(const T1& x)
{
    return intrinsics::log(x);
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/log_exp.hpp#L79

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

Returns the natural logarithm of the x. Accepts and returns expressions.

Source code
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>)>
KFR_FUNCTION internal::expression_function<fn::log, E1> log(E1&& x)
{
    return { fn::log(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/log_exp.hpp#L86

log10 function

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

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

Source code
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>)>
KFR_FUNCTION flt_type<T1> log10(const T1& x)
{
    return intrinsics::log10(x);
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/log_exp.hpp#L107

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

Returns the common (base-10) logarithm of the x. Accepts and returns expressions.

Source code
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>)>
KFR_FUNCTION internal::expression_function<fn::log10, E1> log10(E1&& x)
{
    return { fn::log10(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/log_exp.hpp#L114

log2 function

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

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

Source code
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>)>
KFR_FUNCTION flt_type<T1> log2(const T1& x)
{
    return intrinsics::log2(x);
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/log_exp.hpp#L93

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

Returns the binary (base-2) logarithm of the x. Accepts and returns expressions.

Source code
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>)>
KFR_FUNCTION internal::expression_function<fn::log2, E1> log2(E1&& x)
{
    return { fn::log2(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/log_exp.hpp#L100

log_fmadd function

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

Returns log(x) * m + a.

Source code
template <typename T1, typename T2, typename T3, KFR_ENABLE_IF(is_numeric_args<T1, T2, T3>)>
KFR_FUNCTION flt_type<common_type<T1, T2, T3>> log_fmadd(const T1& x, const T2& y, const T3& z)
{
    return intrinsics::log_fmadd(x, y, z);
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/log_exp.hpp#L178

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

Returns log(x) * m + a. Accepts and returns expressions.

Source code
template <typename E1, typename E2, typename E3, KFR_ENABLE_IF(is_input_expressions<E1, E2, E3>)>
KFR_FUNCTION internal::expression_function<fn::log_fmadd, E1, E2, E3> log_fmadd(E1&& x, E2&& y, E3&& z)
{
    return { fn::log_fmadd(), std::forward<E1>(x), std::forward<E2>(y), std::forward<E3>(z) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/log_exp.hpp#L185

logb function

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

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

Source code
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>)>
KFR_FUNCTION flt_type<T1> logb(const T1& x)
{
    return intrinsics::logb(x);
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/log_exp.hpp#L121

template <typename E1,
          KFR_ENABLE_IF(is_input_expression<E1>)>
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 code
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>)>
KFR_FUNCTION internal::expression_function<fn::logb, E1> logb(E1&& x)
{
    return { fn::logb(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/log_exp.hpp#L129

logm function

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

Returns log(x) * y.

Source code
template <typename T1, typename T2, KFR_ENABLE_IF(is_numeric_args<T1, T2>)>
KFR_FUNCTION flt_type<common_type<T1, T2>> logm(const T1& x, const T2& y)
{
    return intrinsics::logm(x, y);
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/log_exp.hpp#L150

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

Returns log(x) * y. Accepts and returns expressions.

Source code
template <typename E1, typename E2, KFR_ENABLE_IF(is_input_expressions<E1, E2>)>
KFR_FUNCTION internal::expression_function<fn::logm, E1, E2> logm(E1&& x, E2&& y)
{
    return { fn::logm(), std::forward<E1>(x), std::forward<E2>(y) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/log_exp.hpp#L157

logn function

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

Returns the logarithm of the x with base y.

Source code
template <typename T1, typename T2, KFR_ENABLE_IF(is_numeric_args<T1, T2>)>
KFR_FUNCTION flt_type<common_type<T1, T2>> logn(const T1& x, const T2& y)
{
    return intrinsics::logn(x, y);
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/log_exp.hpp#L136

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

Returns the logarithm of the x with base y. Accepts and returns expressions.

Source code
template <typename E1, typename E2, KFR_ENABLE_IF(is_input_expressions<E1, E2>)>
KFR_FUNCTION internal::expression_function<fn::logn, E1, E2> logn(E1&& x, E2&& y)
{
    return { fn::logn(), std::forward<E1>(x), std::forward<E2>(y) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/log_exp.hpp#L143

pow function

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

Returns the x raised to the given power y.

Source code
template <typename T1, typename T2, KFR_ENABLE_IF(is_numeric_args<T1, T2>)>
KFR_FUNCTION flt_type<common_type<T1, T2>> pow(const T1& x, const T2& y)
{
    return intrinsics::pow(x, y);
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/log_exp.hpp#L192

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

Returns the x raised to the given power y. Accepts and returns expressions.

Source code
template <typename E1, typename E2, KFR_ENABLE_IF(is_input_expressions<E1, E2>)>
KFR_FUNCTION internal::expression_function<fn::pow, E1, E2> pow(E1&& x, E2&& y)
{
    return { fn::pow(), std::forward<E1>(x), std::forward<E2>(y) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/log_exp.hpp#L199

root function

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

Returns the real nth root of the x.

Source code
template <typename T1, typename T2, KFR_ENABLE_IF(is_numeric_args<T1, T2>)>
KFR_FUNCTION flt_type<common_type<T1, T2>> root(const T1& x, const T2& y)
{
    return intrinsics::root(x, y);
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/log_exp.hpp#L206

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

Returns the real nth root of the x. Accepts and returns expressions.

Source code
template <typename E1, typename E2, KFR_ENABLE_IF(is_input_expressions<E1, E2>)>
KFR_FUNCTION internal::expression_function<fn::root, E1, E2> root(E1&& x, E2&& y)
{
    return { fn::root(), std::forward<E1>(x), std::forward<E2>(y) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/log_exp.hpp#L213


Auto-generated from sources, Revision , https://github.com/kfrlib/kfr/blob//include/kfr/