Computes the natural logarithm of the \(\Gamma\) function.
Defined in header
#include <eve/module/special.hpp>
{
template< eve::floating_ordered_value T >
}
constexpr callable_log_gamma_ log_gamma
Computes the natural logarithm of the function.
Definition: log_gamma.hpp:59
Parameters
Return value
The value of the logarithm of the \(\Gamma\) function is returned.
- Warning
- For real floating inputs this callable returns NaN if
eve::gamma(x)
is less than zero
Real version
#include <eve/module/special.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft pf = {0.5f, -1.5f, -1.0f, 1.0f, 2.0f,
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
;
float xf = 4.0f;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
return 0;
}
constexpr callable_nan_ nan
Computes the IEEE NaN constant.
Definition: nan.hpp:53
constexpr callable_minf_ minf
Computes the -infinity ieee value.
Definition: minf.hpp:60
constexpr callable_inf_ inf
Computes the infinity ieee value.
Definition: inf.hpp:58
Lightweight type-wrapper.
Definition: as.hpp:29
Wrapper for SIMD registers.
Definition: wide.hpp:65
Complex version
#include <eve/module/complex.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft ref = { 0.0f, 1.0f, -1.0f, 0.5f};
wide_ft imf = { 2.0f , -1.0, -5.0, 0.0};
auto z = eve::as_complex_t<wide_ft>(ref, imf);
std::cout
<< "---- simd" << std::endl
<< "<- z = " << z << std::endl
return 0;
}