1#ifndef STAN_MATH_PRIM_FUN_GRAD_REG_INC_BETA_HPP
2#define STAN_MATH_PRIM_FUN_GRAD_REG_INC_BETA_HPP
34 const T& digammaA,
const T& digammaB,
35 const T& digammaSum,
const T& betaAB) {
41 g1 = (dBda - b1 * (digammaA - digammaSum)) / betaAB;
42 g2 = (dBdb - b1 * (digammaB - digammaSum)) / betaAB;
void grad_reg_inc_beta(T &g1, T &g2, const T &a, const T &b, const T &z, const T &digammaA, const T &digammaB, const T &digammaSum, const T &betaAB)
Computes the gradients of the regularized incomplete beta function.
void grad_inc_beta(fvar< T > &g1, fvar< T > &g2, fvar< T > a, fvar< T > b, fvar< T > z)
Gradient of the incomplete beta function beta(a, b, z) with respect to the first two arguments.
fvar< T > inc_beta(const fvar< T > &a, const fvar< T > &b, const fvar< T > &x)
fvar< T > beta(const fvar< T > &x1, const fvar< T > &x2)
Return fvar with the beta function applied to the specified arguments and its gradient.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...