12 static double lnbeta(
double a,
double b)
44 double denom=1.0/(
betai(ca,cb,eps1)-
betai(ca,cb,eps));
72 if (x < 0.0 || x > 1.0) cerr <<
"Bad x in routine betai" <<
endl;
74 if (x == 0.0 || x==1.0)
83 return 1.0-bt*
betacf(b,a,1.0-x)/b;
162 for (m=1;m<=
maxn;m++)
165 aa=m*(b-m)*x/((um+m2)*(a+m2));
172 aa = -(a+m)*(ssum+m)*x/((a+m2)*(up+m2));
185 cerr <<
"num interations exceeded " <<
endl;
216 const double lpp =0.9189385332046727417803297;
218 const double c[9]={0.99999999999980993,
224 -0.13857109526572012,
225 9.9843695780195716e-6,
226 1.5056327351493116e-7};
229 for (
int i=1;i<=n+1;i++)
241 const double lpi =1.1447298858494001741434272;
242 const double pi =3.1415926535897932384626432;
Base class for dvariable.
Description not yet available.
double gammln(double xx)
Log gamma function.
#define ADUNCONST(type, obj)
Creates a shallow copy of obj that is not CONST.
double qbeta(double x, double a, double b, double eps)
d3_array sin(const d3_array &arr3)
Returns d3_array results with computed sin from elements in arr3.
df1_two_variable fabs(const df1_two_variable &x)
void default_evaluation3ind(void)
Description not yet available.
double inv_cumd_beta_stable(double a, double b, double y, double eps)
void set_gradient_stack(void(*func)(void), double *dep_addr, double *ind_addr1=NULL, double mult1=0, double *ind_addr2=NULL, double mult2=0)
Description not yet available.
prnstream & endl(prnstream &)
Description not yet available.
d3_array exp(const d3_array &arr3)
Returns d3_array results with computed exp from elements in arr3.
double betai(const double a, const double b, const double x, int maxit)
Incomplete beta function for constant objects.
static double lnbeta(double a, double b)
Float betacf(Float a, Float b, Float x, int MAXIT)
Description not yet available.
Description not yet available.
dvector value(const df1_one_vector &v)
static dvariable gammlnguts(const prevariable &_z)
static _THREAD grad_stack * GRAD_STACK1
Fundamental data type for reverse mode automatic differentiation.
d3_array log(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
d3_array pow(const d3_array &m, int e)
Description not yet available.