Skip to content

Other math functions

factorial_approx function

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

Returns the approximate factorial of an argument

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

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

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

Creates expression that returns the approximate factorial of an argument

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

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

gamma function

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

Returns the approximate gamma function of an argument

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

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

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

Creates expression that returns the approximate gamma function of an argument

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

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


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