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#L128

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

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#L51

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#L44

exp_fmadd function

template <typename T1, typename T2, typename T3,
          KFR_ENABLE_IF(is_numeric_args<T1, T2, T3>)>
flt_type<std::common_type_t<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<std::common_type_t<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#L100

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#L58

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#L72

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#L65

log_fmadd function

template <typename T1, typename T2, typename T3,
          KFR_ENABLE_IF(is_numeric_args<T1, T2, T3>)>
flt_type<std::common_type_t<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<std::common_type_t<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#L107

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#L79

logm function

template <typename T1, typename T2,
          KFR_ENABLE_IF(is_numeric_args<T1, T2>)>
flt_type<std::common_type_t<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<std::common_type_t<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#L93

logn function

template <typename T1, typename T2,
          KFR_ENABLE_IF(is_numeric_args<T1, T2>)>
flt_type<std::common_type_t<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<std::common_type_t<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#L86

pow function

template <typename T1, typename T2,
          KFR_ENABLE_IF(is_numeric_args<T1, T2>)>
flt_type<std::common_type_t<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<std::common_type_t<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#L114

root function

template <typename T1, typename T2,
          KFR_ENABLE_IF(is_numeric_args<T1, T2>)>
flt_type<std::common_type_t<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<std::common_type_t<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#L121


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