Computes the Rising Factorial function i.e. \(\frac{\Gamma(x+a)}{\Gamma(x)}\).
Defined in header
#include <eve/module/special.hpp>
{
template< eve::floating_real_value T, eve::floating_real_value U >
template< eve::floating_value T, eve::floating_value U >
template< eve::floating_value T, eve::floating_value U >
template< eve::floating_value T, eve::floating_value U >
}
constexpr callable_rising_factorial_ rising_factorial
Computes the Rising Factorial function i.e. .
Definition: rising_factorial.hpp:87
Definition: all_of.hpp:22
Parameters
a
, x
: strictly positive real floating argument.
a
, x
: real floating or complex arguments.
Return value
The value of the natural logarithm of the rising_factorial is returned.
#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'
double xi = 1.8;
std::cout << "---- scalar" << '\n'
<< " xi = " << 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
return 0;
}
eve::raw
The expression raw(rising_factorial)(a,x)
uses the crude formula with all its limitations and innacuracies and return a Nan if a
and a+x
are not both positive.
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'
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(rising_factorial)(a,x)
uses reflection tricks and computes the function for all real a
and x
, 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'
return 0;
}
constexpr pedantic_type const pedantic
Higher-order Callable Object imbuing more standard semantic onto other Callable Objects.
Definition: pedantic.hpp:56