Skip to content

base

acos function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::acos, E1> acos(E1 &&x)

Returns template expression that returns the arc cosine of x.

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_INTRINSIC expression_function<fn::acos, E1> acos(E1&& x)
{
    return { fn::acos(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L206

asin function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::asin, E1> asin(E1 &&x)

Returns template expression that returns the arc sine of x.

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_INTRINSIC expression_function<fn::asin, E1> asin(E1&& x)
{
    return { fn::asin(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L197

atan function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::atan, E1> atan(E1 &&x)

Returns template expression that returns the arc tangent of x.

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::atan, E1> atan(E1&& x)
{
    return { fn::atan(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L335

atan2 function

template <typename E1, typename E2,
          KFR_ACCEPT_EXPRESSIONS(E1, E2)>
expression_function<fn::atan2, E1, E2> atan2(E1 &&x, E2 &&y)

Returns template expression that returns the arc tangent of y/x.

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

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L353

atan2deg function

template <typename E1, typename E2,
          KFR_ACCEPT_EXPRESSIONS(E1, E2)>
expression_function<fn::atan2deg, E1, E2> atan2deg(E1 &&x,
                                                   E2 &&y)

Returns template expression that returns the arc tangent of y/x (expressed in degrees).

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

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L362

atandeg function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::atandeg, E1> atandeg(E1 &&x)

Returns template expression that returns the arc tangent of the x, expressed in degrees.

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::atandeg, E1> atandeg(E1&& x)
{
    return { fn::atandeg(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L344

cabs function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::cabs, E1> cabs(E1 &&x)

Returns template expression that returns the absolute value (magnitude) of the complex number x

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::cabs, E1> cabs(E1&& x)
{
    return { fn::cabs(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L249

cabssqr function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::cabssqr, E1> cabssqr(E1 &&x)

Returns template expression that returns the squared absolute value (magnitude squared) of the complex number x

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::cabssqr, E1> cabssqr(E1&& x)
{
    return { fn::cabssqr(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L242

carg function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::carg, E1> carg(E1 &&x)

Returns template expression that returns the phase angle (argument) of the complex number x

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::carg, E1> carg(E1&& x)
{
    return { fn::carg(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L256

cartesian function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::cartesian, E1> cartesian(E1 &&x)

Returns template expression that converts complex number to cartesian

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::cartesian, E1> cartesian(E1&& x)
{
    return { fn::cartesian(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L312

cbrt function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
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_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::cbrt, E1> cbrt(E1&& x)
{
    return { fn::cbrt(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L511

ccos function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::ccos, E1> ccos(E1 &&x)

Returns template expression that returns the cosine of the the complex value x

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::ccos, E1> ccos(E1&& x)
{
    return { fn::ccos(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L227

ccosh function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::ccosh, E1> ccosh(E1 &&x)

Returns template expression that returns the hyperbolic cosine of the the complex value x

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::ccosh, E1> ccosh(E1&& x)
{
    return { fn::ccosh(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L234

cexp function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::cexp, E1> cexp(E1 &&x)

Returns template expression that returns \(e\) raised to the complex number x

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::cexp, E1> cexp(E1&& x)
{
    return { fn::cexp(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L284

cexp10 function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::cexp10, E1> cexp10(E1 &&x)

Returns template expression that returns 10 raised to the complex number x

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::cexp10, E1> cexp10(E1&& x)
{
    return { fn::cexp10(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L298

cexp2 function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::cexp2, E1> cexp2(E1 &&x)

Returns template expression that returns 2 raised to the complex number x

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::cexp2, E1> cexp2(E1&& x)
{
    return { fn::cexp2(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L291

clog function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::clog, E1> clog(E1 &&x)

Returns template expression that returns the natural logarithm of the complex number x

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::clog, E1> clog(E1&& x)
{
    return { fn::clog(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L263

clog10 function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::clog10, E1> clog10(E1 &&x)

Returns template expression that returns the common (base-10) logarithm of the complex number x

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::clog10, E1> clog10(E1&& x)
{
    return { fn::clog10(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L277

clog2 function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::clog2, E1> clog2(E1 &&x)

Returns template expression that returns the binary (base-2) logarithm of the complex number x

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::clog2, E1> clog2(E1&& x)
{
    return { fn::clog2(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L270

cos function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::cos, E1> cos(E1 &&x)

Returns the trigonometric cosine of x. Accepts and returns expressions.

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::cos, E1> cos(E1&& x)
{
    return { fn::cos(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L48

cosdeg function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::cosdeg, E1> cosdeg(E1 &&x)

Returns the trigonometric cosine of the x (expressed in degrees). Accepts and returns expressions.

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::cosdeg, E1> cosdeg(E1&& x)
{
    return { fn::cosdeg(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L104

cosh function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::cosh, E1> cosh(E1 &&x)

Returns template expression that returns the hyperbolic cosine of the x

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::cosh, E1> cosh(E1&& x)
{
    return { fn::cosh(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L382

coshsinh function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::coshsinh, E1> coshsinh(E1 &&x)

Returns template expression that returns the hyperbolic cosine of the even elements of the x and the hyperbolic sine of the odd elements of the x

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::coshsinh, E1> coshsinh(E1&& x)
{
    return { fn::coshsinh(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L412

cossin function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::cossin, E1> cossin(E1 &&x)

Returns the trigonometric cosine of the even elements of the x and sine of the odd elements. x must be a vector. Accepts and returns expressions.

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::cossin, E1> cossin(E1&& x)
{
    return { fn::cossin(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L86

cossindeg function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::cossindeg, E1> cossindeg(E1 &&x)

Returns the trigonometric cosine of the even elements of the x and sine of the odd elements. x must be expressed in degrees. Accepts and returns expressions.

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::cossindeg, E1> cossindeg(E1&& x)
{
    return { fn::cossindeg(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L144

coth function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::coth, E1> coth(E1 &&x)

Returns template expression that returns the hyperbolic cotangent of the x

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::coth, E1> coth(E1&& x)
{
    return { fn::coth(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L396

csin function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::csin, E1> csin(E1 &&x)

Returns template expression that returns the sine of the the complex value x

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::csin, E1> csin(E1&& x)
{
    return { fn::csin(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L213

csinh function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::csinh, E1> csinh(E1 &&x)

Returns template expression that returns the hyperbolic sine of the complex number x

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::csinh, E1> csinh(E1&& x)
{
    return { fn::csinh(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L220

csqr function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::csqr, E1> csqr(E1 &&x)

Returns template expression that returns square of the complex number x

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::csqr, E1> csqr(E1&& x)
{
    return { fn::csqr(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L326

csqrt function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::csqrt, E1> csqrt(E1 &&x)

Returns template expression that returns square root of the complex number x

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::csqrt, E1> csqrt(E1&& x)
{
    return { fn::csqrt(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L319

exp function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
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_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::exp, E1> exp(E1&& x)
{
    return { fn::exp(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L419

exp10 function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
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_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::exp10, E1> exp10(E1&& x)
{
    return { fn::exp10(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L433

exp2 function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
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_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::exp2, E1> exp2(E1&& x)
{
    return { fn::exp2(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L426

exp_fmadd function

template <typename E1, typename E2, typename E3,
          KFR_ACCEPT_EXPRESSIONS(E1, E2, E3)>
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_ACCEPT_EXPRESSIONS(E1, E2, E3)>
KFR_FUNCTION 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/base/math_expressions.hpp#L483

factorial_approx function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
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_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION 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/base/math_expressions.hpp#L167

fastcos function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::fastcos, E1> fastcos(E1 &&x)

Returns an approximation of the trigonometric cosine of x. Accepts and returns expressions.

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::fastcos, E1> fastcos(E1&& x)
{
    return { fn::fastcos(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L66

fastcosdeg function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::fastcosdeg, E1> fastcosdeg(E1 &&x)

Returns an approximation of the trigonometric cosine of the x (expressed in degrees). Accepts and returns expressions.

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::fastcosdeg, E1> fastcosdeg(E1&& x)
{
    return { fn::fastcosdeg(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L124

fastsin function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::fastsin, E1> fastsin(E1 &&x)

Returns an approximation of the trigonometric sine of x. Accepts and returns expressions.

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::fastsin, E1> fastsin(E1&& x)
{
    return { fn::fastsin(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L57

fastsindeg function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::fastsindeg, E1> fastsindeg(E1 &&x)

Returns an approximation of the trigonometric sine of the x (expressed in degrees). Accepts and returns expressions.

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::fastsindeg, E1> fastsindeg(E1&& x)
{
    return { fn::fastsindeg(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L114

gamma function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
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_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::gamma, E1> gamma(E1&& x)
{
    return { fn::gamma(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L160

log function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
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_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::log, E1> log(E1&& x)
{
    return { fn::log(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L440

log10 function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
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_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::log10, E1> log10(E1&& x)
{
    return { fn::log10(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L454

log2 function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
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_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::log2, E1> log2(E1&& x)
{
    return { fn::log2(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L447

log_fmadd function

template <typename E1, typename E2, typename E3,
          KFR_ACCEPT_EXPRESSIONS(E1, E2, E3)>
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_ACCEPT_EXPRESSIONS(E1, E2, E3)>
KFR_FUNCTION 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/base/math_expressions.hpp#L490

logb function

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

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L462

logm function

template <typename E1, typename E2,
          KFR_ACCEPT_EXPRESSIONS(E1, E2)>
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_ACCEPT_EXPRESSIONS(E1, E2)>
KFR_FUNCTION 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/base/math_expressions.hpp#L476

logn function

template <typename E1, typename E2,
          KFR_ACCEPT_EXPRESSIONS(E1, E2)>
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_ACCEPT_EXPRESSIONS(E1, E2)>
KFR_FUNCTION 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/base/math_expressions.hpp#L469

polar function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::polar, E1> polar(E1 &&x)

Returns template expression that converts complex number to polar

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::polar, E1> polar(E1&& x)
{
    return { fn::polar(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L305

pow function

template <typename E1, typename E2,
          KFR_ACCEPT_EXPRESSIONS(E1, E2)>
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_ACCEPT_EXPRESSIONS(E1, E2)>
KFR_FUNCTION 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/base/math_expressions.hpp#L497

root function

template <typename E1, typename E2,
          KFR_ACCEPT_EXPRESSIONS(E1, E2)>
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_ACCEPT_EXPRESSIONS(E1, E2)>
KFR_FUNCTION 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/base/math_expressions.hpp#L504

sin function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::sin, E1> sin(E1 &&x)

Returns the trigonometric sine of x. Accepts and returns expressions.

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::sin, E1> sin(E1&& x)
{
    return { fn::sin(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L39

sinc function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::sinc, E1> sinc(E1 &&x)

Returns the sinc function of x. Accepts and returns expressions.

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::sinc, E1> sinc(E1&& x)
{
    return { fn::sinc(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L153

sincos function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::sincos, E1> sincos(E1 &&x)

Returns the trigonometric sine of the even elements of the x and cosine of the odd elements. x must be a vector. Accepts and returns expressions.

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::sincos, E1> sincos(E1&& x)
{
    return { fn::sincos(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L76

sincosdeg function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::sincosdeg, E1> sincosdeg(E1 &&x)

Returns the trigonometric sine of the even elements of the x and cosine of the odd elements. x must be expressed in degrees. Accepts and returns expressions.

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::sincosdeg, E1> sincosdeg(E1&& x)
{
    return { fn::sincosdeg(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L134

sindeg function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::sindeg, E1> sindeg(E1 &&x)

Returns the trigonometric sine of the x (expressed in degrees). Accepts and returns expressions.

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::sindeg, E1> sindeg(E1&& x)
{
    return { fn::sindeg(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L95

sinh function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::sinh, E1> sinh(E1 &&x)

Returns template expression that returns the hyperbolic sine of the x

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::sinh, E1> sinh(E1&& x)
{
    return { fn::sinh(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L375

sinhcosh function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::sinhcosh, E1> sinhcosh(E1 &&x)

Returns template expression that returns the hyperbolic sine of the even elements of the x and the hyperbolic cosine of the odd elements of the x

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::sinhcosh, E1> sinhcosh(E1&& x)
{
    return { fn::sinhcosh(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L404

sqrt function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::sqrt, E1> sqrt(E1 &&x)

Returns template expression that returns the positive square root of the x. \(\sqrt{x}\)

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::sqrt, E1> sqrt(E1&& x)
{
    return { fn::sqrt(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L176

tanh function

template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
expression_function<fn::tanh, E1> tanh(E1 &&x)

Returns template expression that returns the hyperbolic tangent of the x

Source code
template <typename E1, KFR_ACCEPT_EXPRESSIONS(E1)>
KFR_FUNCTION expression_function<fn::tanh, E1> tanh(E1&& x)
{
    return { fn::tanh(), std::forward<E1>(x) };
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/math_expressions.hpp#L389

to_handle function

template <typename E, typename T = expression_value_type<E>,
          index_t Dims = expression_dims<E>>
expression_handle<T, Dims> to_handle(E &expr)

Converts the given expression into an opaque object. This overload takes reference to the expression. @warning Use with caution with local variables.

Source code
template <typename E, typename T = expression_value_type<E>, index_t Dims = expression_dims<E>>
KFR_INTRINSIC expression_handle<T, Dims> to_handle(E& expr)
{
    return expression_handle<T>(std::addressof(expr), internal::make_expression_vtable<T, Dims, E>());
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/handle.hpp#L293

template <typename E, typename T = expression_value_type<E>,
          index_t Dims = expression_dims<E>>
expression_handle<T, Dims> to_handle(E &&expr)

Converts the given expression into an opaque object. This overload takes ownership of the expression (Move semantics). @note Use std::move to force use of this overload.

Source code
template <typename E, typename T = expression_value_type<E>, index_t Dims = expression_dims<E>>
KFR_INTRINSIC expression_handle<T, Dims> to_handle(E&& expr)
{
    std::shared_ptr<expression_resource> ptr = make_resource(std::move(expr));
    void* instance                           = ptr->instance();
    return expression_handle<T, Dims>(instance, internal::make_expression_vtable<T, Dims, E>(),
                                      std::move(ptr));
}

https://github.com/kfrlib/kfr/blob//include/kfr/base/handle.hpp#L303


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