E.V.E
v2023.02.15
Loading...
Searching...
No Matches
◆
polygamma
eve::polygamma = functor<polygamma_t>
inline
constexpr
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
}
eve::conditional_expr
Specifies that a type is a Conditional Expression.
Definition
conditional.hpp:28
eve::floating_value
The concept floating_value<T> is satisfied if and only if T satisfies eve::value and the element type...
Definition
value.hpp:116
eve::logical_value
The concept logical_value<T> is satisfied if and only if T satisfies eve::value and the element type ...
Definition
value.hpp:134
eve::scalar_value
Specify that a type represents a scalar value The concept scalar_value<T> is satisfied if and only if...
Definition
scalar.hpp:138
eve::polygamma
constexpr auto polygamma
elementwise_callable object computing the Polygamma function i.e. the nth derivative of the digamma f...
Definition
polygamma.hpp:79
eve::translate_t
typename decltype(detail::as_translated_type(as< T >{}))::type translate_t
Returns the final translated type of T.
Definition
translation.hpp:107
eve
EVE Main Namespace.
Definition
abi.hpp:19
Parameters
n
:
scalar_value
. (see note below)
x
:
flaoting value
.
c
:
Conditional expression
masking the operation.
m
:
Logical value
masking the operation.
Return value
The value of the Polygamma function: \(\psi(n, x) = \frac{\mbox{d}^{n+1}}{\mbox{d}x^{n+1}}\log\Gamma(x)\) is returned.
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
DLMF: Gamma and Psi Functions
Wolfram MathWorld: Polygamma Function
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;
}
}
eve