◆ beta
Callable object computing the beta function. \(\mbox{B}(x,y)=\int_0^1 t^{x-1}(1-t)^{y-1}\mbox{d}t\). Required header: Members Functions
template< floating_value T, floating_value U > auto operator()( T x, U y ) const noexcept requires compatible< T, U >;
Parameters
Return value Returns elementwise \(\displaystyle \frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)}\). The result type is the common compatible type of the two parameters. auto operator[]( conditional_expression auto cond ) const noexcept;
Higher-order function generating a masked version of eve::beta Parameters
Return value A Callable object so that the expression Supported decorators: Required header: : The expression ExampleSee it live on Compiler Explorer #include <eve/function/beta.hpp>
#include <eve/wide.hpp>
#include <iostream>
using wide_ft = eve::wide <float, eve::fixed<4>>;
int main()
{
wide_ft pf = { 0.0f, 1.0f, 4.0f, 2.0f };
wide_ft qf = { 1.0f, 1.0f, 3.0f, 5.0f};
std::cout
<< "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "<- qf = " << qf << '\n'
float xf = 2.0f;
float yf = 10.0f;
std::cout
<< "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "<- yf = " << yf << '\n'
return 0;
}
constexpr callable_beta_ beta Callable object computing the beta function. . Definition: beta.hpp:78 |