Computes the Stirling approximation of the \(\Gamma\) function.
The value of an approximation of the \(\Gamma\) function by \(\displaystyle \Gamma(x) \approx \sqrt{2 \pi} x^{x-\frac12}
e^{-x} \left( 1 + \frac1{x} P(\frac1{x})\right)\), where \(P\) is a polynomial, is returned.
#include <eve/module/special.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft pf = {0.0f, -0.0f, -1.0f, 10.0f, 20.0f,
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
float xf = 1.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
constexpr pedantic_type const pedantic
Higher-order Callable Object imbuing more standard semantic onto other Callable Objects.
Definition: pedantic.hpp:56
Lightweight type-wrapper.
Definition: as.hpp:29
Wrapper for SIMD registers.
Definition: wide.hpp:65