E.V.E
v2023.02.15
 
Loading...
Searching...
No Matches

◆ rising_factorial

auto eve::rising_factorial = functor<rising_factorial_t>
inlineconstexpr

Defined in header

#include <eve/module/special.hpp>

Callable Signatures

namespace eve
{
// Regular overload
template<typename I, typename T> constexpr as_wide_as_t<T, I> rising_factorial(I a, T x) noexcept; // 1
// Lanes masking
constexpr auto rising_factorial[conditional_expr auto c](/*any of the above overloads*/) noexcept; // 2
constexpr auto rising_factorial[logical_value auto m](/*any of the above overloads*/) noexcept; // 2
// Semantic options
constexpr auto rising_factoriale[raw]/*any of the above overloads*/) noexcept; // 3
constexpr auto rising_factorialee[pedantic](/*any of the above overloads*/) noexcept; // 4
}
Specifies that a type is a Conditional Expression.
Definition conditional.hpp:28
The concept logical_value<T> is satisfied if and only if T satisfies eve::value and the element type ...
Definition value.hpp:132
constexpr auto rising_factorial
elementwise_callable object computing the rising Factorial function i.e. .
Definition rising_factorial.hpp:86
EVE Main Namespace.
Definition abi.hpp:18

Parameters

Return value

  1. The value of the rising_factorial is returned( a and x must be strictly positive).
  2. The operation is performed conditionnaly.
  3. The raw option uses the crude formula with all its limitations and inacurracies and return a Nan if a and a+x are not both positive.
  4. The pedantic option uses reflection tricks and computes the function for all real a and x, returning nan if the result is really undefined.

External references

Example

// revision 1
#include <eve/module/special.hpp>
#include <iostream>
int main()
{
eve::wide n = {1, 2, -3, 7};
eve::wide p = {1.0f, 1.5f, 2.0f, 2.5f};
std::cout << "<- n = " << n << "\n";
std::cout << "<- p = " << p << "\n";
std::cout << "-> rising_factorial(n, p) = " << eve::rising_factorial(n, p) << "\n";
std::cout << "-> rising_factorial[ignore_last(2)](n, p)= " << eve::rising_factorial[eve::ignore_last(2)](n, p) << "\n";
std::cout << "-> rising_factorial[n != 2.0f](n, p) = " << eve::rising_factorial[n != 2.0f](n, p) << "\n";
std::cout << "-> rising_factorial[raw](n, p) = " << eve::rising_factorial[eve::raw](n, p) << "\n";
std::cout << "-> rising_factorial[pedantic](n, p) = " << eve::rising_factorial[eve::pedantic](n, p) << "\n";
}
Conditional expression ignoring the k last lanes from a eve::simd_value.
Definition conditional.hpp:332
Wrapper for SIMD registers.
Definition wide.hpp:86