E.V.E
v2022.03.00

◆ lrising_factorial

eve::lrising_factorial = {}
inlineconstexpr

Computes the natural logarithm of the Rising Factorial function i.e. \(\log\left(\frac{\Gamma(x+a)}{\Gamma(x)}\right)\).

Defined in header

#include <eve/module/special.hpp>

Callable Signatures

namespace eve
{
template< eve::floating_real_value T, eve::floating_real_value U >
auto lrising_factorial(T x,U y) noexcept; //1
template< eve::floating_value T, eve::floating_value U >
auto lrising_factorial(eve::as_complex_t<T> x, U y) noexcept; //2
template< eve::floating_value T, eve::floating_value U >
auto lrising_factorial(T x, eve::as_complex_t<U> y) noexcept; //2
template< eve::floating_value T, eve::floating_value U >
auto lrising_factorial(eve::as_complex_t<T> x, eve::as_complex_t<U> y) noexcept; //2
}
constexpr callable_lrising_factorial_ lrising_factorial
Computes the natural logarithm of the Rising Factorial function i.e. .
Definition: lrising_factorial.hpp:88
Definition: all_of.hpp:22

Parameters

  1. a, x: strictly positive real floating argument.
  2. a, x: real floating or complex arguments.

Return value

The value of the natural logarithm of the rising_factorial is returned.

Example

Real version

#include <eve/module/special.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';
double xi = 1.8;
std::cout << "---- scalar" << '\n'
<< " xi = " << xi << '\n'
<< " -> lrising_factorial(7, xi) = " << eve::lrising_factorial(7, xi) << '\n';
return 0;
}
Wrapper for SIMD registers.
Definition: wide.hpp:65

Complex version

#include <eve/module/complex.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft ref1 = { 0.0f, 1.0f, -1.0f, 0.5f};
wide_ft imf1 = { 2.0f , -1.0, -5.0, 0.0};
auto z1 = eve::as_complex_t<wide_ft>(ref1, imf1);
wide_ft ref2 = { 4.0f, 0.0f, -1.0f, -0.5f};
wide_ft imf2 = { -2.0f , 1.0, 3.0, 10.0};
auto z2 = eve::as_complex_t<wide_ft>(ref2, imf2);
std::cout
<< "---- simd" << std::endl
<< "<- z1 = " << z1 << std::endl
<< "<- z2 = " << z2 << std::endl
<< "-> lrising_factorial(z1,z2) = " << eve::lrising_factorial(z1,z2) << std::endl;
return 0;
}

Semantic Modifiers

  • eve::raw

    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.

    #include <eve/module/special.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'
    << " -> raw(lrising_factorial(n, x)) = " << eve::raw(eve::lrising_factorial)(n, x) << '\n';
    return 0;
    }
    constexpr raw_type const raw
    Higher-order Callable Object imbuing quick and dirty behaviour onto other Callable Objects.
    Definition: raw.hpp:43
  • eve::pedantic

    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.

    Example

    #include <eve/module/special.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'
    << " -> pedantic(lrising_factorial(n, x)) = " << eve::pedantic(eve::lrising_factorial)(n, x) << '\n';
    return 0;
    }
    constexpr pedantic_type const pedantic
    Higher-order Callable Object imbuing more standard semantic onto other Callable Objects.
    Definition: pedantic.hpp:56