E.V.E  0.1-beta

◆ lrising_factorial

eve::lrising_factorial = {}
inlineconstexpr

Callable object computing the lrising_factorial function i.e. \(\log\left(\frac{\Gamma(x+a)}{\Gamma(x)}\right)\).

Required header: #include <eve/function/lrising_factorial.hpp>

Members Functions

Member Effect
operator() lrising_factorial operation
operator[] Construct a conditional version of current function object

template< real_value I, floating_value T > auto operator()( I a, T x ) const noexcept;

Parameters

a: real_value.a must be positive or the result is Nan

x: floating real value. a+x must be positive or the result is Nan

Return value


auto operator[]( conditional_expression auto cond ) const noexcept;

Higher-order function generating a masked version of eve::lrising_factorial

Parameters

cond : conditional expression

Return value

A Callable object so that the expression lrising_factorial[cond](x, ...) is equivalent to if_else(cond,lrising_factorial(x, ...),x)


Supported decorators

  • eve::raw

    Required header: #include <eve/function/lrising_factorial.hpp>

    The expression raw(lrising_factorial)(a,x) uses the crude formula with all its limitations and inacurracies and return a Nan if a and a+x are not both positive

  • eve::pedantic

    Required header: #include <eve/function/pedantic/lrising_factorial.hpp>

    The expression pedantic(lrising_factorial)(a,x) uses reflection tricks and computes the function for all real a and x, and in fact computes the logarithm of the absolute value of the Pochammer symbol \(\log\left|\frac{\Gamma(x+a)}{\Gamma(x)}\right|\) returning nan if the result is really undefined.

  • eve::diff, eve::diff_1st, eve::diff_2nd, eve::diff_nth

    Required header: #include <eve/function/diff/lrising_factorial.hpp>

    The expression diff_1st(lrising_factorial)(a,x) and diff_2nd(lrising_factorial)(a,x) computes the derivative of the function relative to the first or second parameter respectively.

    These decorators can be combined to the other available ones : for instance the call

    pedantic(diff_1st)(lrising_factorial)(a,x)

    will compute the derivative of pedantic(lrising_factorial) relative to the first parameter.

Example

See it live on Compiler Explorer

#include <eve/function/pedantic/lrising_factorial.hpp>
#include <eve/wide.hpp>
#include <iostream>
#include <iomanip>
int main()
{
w32_t n = {1, 2, -3, 7};
wf_t x = {1.0f, 1.5f, 2.0f, 2.5f};
std::cout << "---- simd" << std::setprecision(17) << '\n'
<< " <- n = " << n << '\n'
<< " <- x = " << x << '\n'
<< " -> lrising_factorial(n, x) = " << eve::lrising_factorial(n, x) << '\n'
<< " -> pedantic(lrising_factorial(n, x)) = " << eve::pedantic(eve::lrising_factorial)(n, x) << '\n';
double xi = 1.8;
std::cout << "---- scalar" << '\n'
<< " xi = " << xi << '\n'
<< " -> lrising_factorial(7, xi) = " << eve::lrising_factorial(7, xi) << '\n';
return 0;
}
constexpr callable_lrising_factorial_ lrising_factorial
Callable object computing the lrising_factorial function i.e. .
Definition: lrising_factorial.hpp:99
constexpr pedantic_type const pedantic
Higher-order Callable Object imbuing more standard semantic onto other Callable Objects.
Definition: pedantic.hpp:56
Wrapper for SIMD registers.
Definition: wide.hpp:65