Computes the beta incomplete function. \(\displaystyle \mbox{I}_s(x,y) =
\frac{1}{\mbox{B}(x,y)}\int_0^s t^{x-1}(1-t)^{y-1}\mbox{d}t\).
The value of the incomplete beta function is returned.
#include <eve/module/special.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft pf = { 0.0f, 0.1f, 0.5f, 2.0f};
wide_ft qf = { 1.0f, 1.0f, 3.0f, 5.0f};
wide_ft rf = { 4.0f, 2.0f, 1.0f, 0.2f};
std::cout
<< "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "<- qf = " << qf << '\n'
<< "<- rf = " << rf << '\n'
<<
"-> betainc(pf, qf, rf) = " <<
eve::betainc(pf, qf, rf) <<
'\n'
;
float xf = 0.2f;
float yf = 0.5f;
float zf = 2.0f;
std::cout
<< "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "<- yf = " << yf << '\n'
<< "<- zf = " << zf << '\n'
<<
"-> betainc(xf, yf, zf) = " <<
eve::betainc(xf, yf, zf) <<
'\n';
return 0;
}
constexpr callable_betainc_ betainc
Computes the beta incomplete function. .
Definition: betainc.hpp:54
Wrapper for SIMD registers.
Definition: wide.hpp:65