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

◆ polygamma

eve::polygamma = functor<polygamma_t>
inlineconstexpr

Header file

#include <eve/module/special.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto polygamma(scalar_value auto n, floating_value auto x) noexcept; // 1
// Lanes masking
constexpr auto polygamma[conditional_expr auto c](scalar_value auto n, floating_value auto x) noexcept; // 2
constexpr auto polygamma[logical_value auto m](scalar_value auto n, floating_value auto x) noexcept; // 2
}
Specifies that a type is a Conditional Expression.
Definition conditional.hpp:28
The concept floating_value<T> is satisfied if and only if T satisfies eve::value and the element type...
Definition value.hpp:116
The concept logical_value<T> is satisfied if and only if T satisfies eve::value and the element type ...
Definition value.hpp:134
Specify that a type represents a scalar value The concept scalar_value<T> is satisfied if and only if...
Definition scalar.hpp:138
constexpr auto polygamma
elementwise_callable object computing the Polygamma function i.e. the nth derivative of the digamma f...
Definition polygamma.hpp:79
typename decltype(detail::as_translated_type(as< T >{}))::type translate_t
Returns the final translated type of T.
Definition translation.hpp:107
EVE Main Namespace.
Definition abi.hpp:19

Parameters

Return value

  1. The value of the Polygamma function: \(\psi(n, x) = \frac{\mbox{d}^{n+1}}{\mbox{d}x^{n+1}}\log\Gamma(x)\) is returned.
  2. The operation is performed conditionnaly.
Note
Only integral (or flint) positive values of n correspond to the proper polygamma definition. You can use non integral values but the function result may be different to the standard definitions of polygamma extensions.

External references

Example

// revision 1
#include <eve/module/special.hpp>
#include <iostream>
int main()
{
eve::wide<double, eve::fixed<4>> z{0.125, 15, -2.45, 1.0};
for(int i=0; i < 5 ; ++i)
{
std::cout << eve::polygamma(i, z) << std::endl;
}
}