E.V.E
v2023.02.15
Loading...
Searching...
No Matches
◆
trigamma
auto eve::trigamma =
functor
<trigamma_t>
inline
constexpr
Header file
#include <eve/module/special.hpp>
Callable Signatures
namespace
eve
{
// Regular overload
constexpr
auto
trigamma
(
floating_value
auto
x)
noexcept
;
// 1
// Lanes masking
constexpr
auto
trigamma
[
conditional_expr
auto
c](
floating_value
auto
x)
noexcept
;
// 2
constexpr
auto
trigamma
[
logical_value
auto
m](
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::trigamma
constexpr auto trigamma
elementwise_callable object computing the Trigamma function i.e. the second derivative of the functi...
Definition
trigamma.hpp:70
eve
EVE Main Namespace.
Definition
abi.hpp:19
Parameters
x
:
floating_value
.
c
:
Conditional expression
masking the operation.
m
:
Logical value
masking the operation.
Return value
The value of the Trigamma function: \(\psi(x) = \frac{\Gamma'(x)}{\Gamma(x)}\) is returned.
The operation is performed conditionally
.
External references
DLMF: Gamma and Psi Functions
Wolfram MathWorld: Trigamma Function
Example
// revision 0
#include <eve/module/special.hpp>
#include <iostream>
#include <iomanip>
int
main()
{
eve::wide
wf = {0.5, 1.0, 1.5, 2.0, 3.0, 10.0, 0.25, 100.0};
std::cout << std::setprecision(15);
std::cout <<
"<- wf = "
<< wf <<
"\n"
;
std::cout <<
"-> trigamma(wf) = "
<<
eve::trigamma
(wf) <<
"\n"
;
std::cout <<
"-> trigamma[wf > 1.0](wf) = "
<<
eve::trigamma
[wf > 1.0](wf) <<
"\n"
;
}
eve::wide
Wrapper for SIMD registers.
Definition
wide.hpp:94
eve