27#ifndef _gcem_incomplete_beta_HPP
28#define _gcem_incomplete_beta_HPP
37constexpr T
incomplete_beta_cf(
const T a,
const T
b,
const T z,
const T c_j,
const T d_j,
const T f_j,
const int depth)
noexcept;
48 return( -z*(a + k)*(a +
b + k)/( (a + 2*k)*(a + 2*k + T(1)) ) );
57 return( z*k*(
b - k)/((a + 2*k - T(1))*(a + 2*k)) );
113incomplete_beta_cf(
const T a,
const T
b,
const T z,
const T c_j,
const T d_j,
const T f_j,
const int depth)
131 return ( (exp(a*
log(z) +
b*
log(T(1)-z) -
lbeta(a,
b)) / a) * \
151 (a + T(1))/(a +
b + T(2)) > z ? \
156template<
typename T1,
typename T2,
typename T3,
typename TC = common_return_t<T1,T2,T3>>
188template<
typename T1,
typename T2,
typename T3>
190common_return_t<T1,T2,T3>
#define GCEM_INCML_BETA_TOL
Definition: gcem_options.hpp:161
#define GCEM_INCML_BETA_MAX_ITER
Definition: gcem_options.hpp:165
constexpr T incomplete_beta_decision(const T a, const T b, const T z, const T c_j, const T d_j, const T f_j, const int depth) noexcept
Definition: incomplete_beta.hpp:97
constexpr T incomplete_beta_coef_odd(const T a, const T b, const T z, const int k) noexcept
Definition: incomplete_beta.hpp:54
constexpr T incomplete_beta_coef_even(const T a, const T b, const T z, const int k) noexcept
Definition: incomplete_beta.hpp:45
constexpr TC incomplete_beta_type_check(const T1 a, const T2 b, const T3 p) noexcept
Definition: incomplete_beta.hpp:159
constexpr T incomplete_beta_cf(const T a, const T b, const T z, const T c_j, const T d_j, const T f_j, const int depth) noexcept
Definition: incomplete_beta.hpp:113
constexpr bool any_nan(const T1 x, const T2 y) noexcept
Definition: is_nan.hpp:48
constexpr T incomplete_beta_check(const T a, const T b, const T z) noexcept
Definition: incomplete_beta.hpp:141
constexpr T incomplete_beta_coef(const T a, const T b, const T z, const int depth) noexcept
Definition: incomplete_beta.hpp:63
constexpr T incomplete_beta_c_update(const T a, const T b, const T z, const T c_j, const int depth) noexcept
Definition: incomplete_beta.hpp:76
constexpr bool is_odd(const llint_t x) noexcept
Definition: is_odd.hpp:36
constexpr T incomplete_beta_begin(const T a, const T b, const T z) noexcept
Definition: incomplete_beta.hpp:128
constexpr T incomplete_beta_d_update(const T a, const T b, const T z, const T d_j, const int depth) noexcept
Definition: incomplete_beta.hpp:85
Definition: is_even.hpp:29
constexpr T abs(const T x) noexcept
Compile-time absolute value function.
Definition: abs.hpp:40
constexpr common_return_t< T1, T2, T3 > incomplete_beta(const T1 a, const T2 b, const T3 z) noexcept
Compile-time regularized incomplete beta function.
Definition: incomplete_beta.hpp:191
constexpr return_t< T > log(const T x) noexcept
Compile-time natural logarithm function.
Definition: log.hpp:186
std::numeric_limits< T > GCLIM
Definition: gcem_options.hpp:74
constexpr common_return_t< T1, T2 > lbeta(const T1 a, const T2 b) noexcept
Compile-time log-beta function.
Definition: lbeta.hpp:39