E.V.E  0.1-beta

◆ digamma

eve::digamma = {}
inlineconstexpr

Callable object computing logarithmic derivative of the \(\Gamma\) function.

Required header: #include <eve/function/digamma.hpp>

Members Functions

Member Effect
operator() the digamma operation
operator[] Construct a conditional version of current function object

template< value T > auto operator()( T x) const noexcept;

Parameters

x: value.

Return value

Returns elementwise the value the logarithmic derivative of the \(\Gamma\) function.

The result type is of the same type as the parameter.


auto operator[]( conditional_expression auto cond ) const noexcept;

Higher-order function generating a masked version of eve::digamma

Parameters

cond : conditional expression

Return value

A Callable object so that the expression digamma[cond](x, ...) is equivalent to if_else(cond,digamma(x, ...),x)


Supported decorators

Example

See it live on Compiler Explorer

#include <eve/function/digamma.hpp>
#include <eve/wide.hpp>
#include <eve/constant/inf.hpp>
#include <eve/constant/minf.hpp>
#include <eve/constant/nan.hpp>
#include <iostream>
int main()
{
wide_ft pd = {0.5, -1.5, 0.1, -1.0, 19.0, 25.0, 21.5, 10000.0};
std::cout << "---- simd" << '\n'
<< "<- pd = " << pd << '\n'
<< "-> digamma(pd) = " << eve::digamma(pd) << '\n';
double xd = -1.0;
std::cout << "---- scalar" << '\n'
<< "<- xd = " << xd << '\n'
<< "-> digamma(xd) = " << eve::digamma(xd) << '\n';
return 0;
}
constexpr callable_digamma_ digamma
Callable object computing logarithmic derivative of the function.
Definition: digamma.hpp:79
Wrapper for SIMD registers.
Definition: wide.hpp:65