E.V.E
v2022.03.00

◆ betainc

eve::betainc = {}
inlineconstexpr

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\).

Defined in header

#include <eve/module/special.hpp>

Callable Signatures

namespace eve
{
eve:common_compatible_value<S, T, U> $name$(S s, T x, U y) noexcept;
}
Definition: value.hpp:103
Definition: all_of.hpp:22

Parameters

Return value

The value of the incomplete beta function is returned.

Example

#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