2 DOUBLE PRECISION FUNCTION dlbeta (A, B)
28 DOUBLE PRECISION A, B, P, Q, CORR, SQ2PIL, D9LGMC, DGAMMA, DLNGAM,
32 DATA sq2pil / 0.9189385332 0467274178 0329736405 62 d0 /
37 IF (p .LE. 0.d0) CALL
xermsg(
'SLATEC',
'DLBETA',
38 +
'BOTH ARGUMENTS MUST BE GT ZERO', 1, 2)
40 IF (p.GE.10.d0) go to 30
41 IF (q.GE.10.d0) go to 20
45 dlbeta =
log(dgamma(p) * (dgamma(q)/dgamma(p+q)) )
50 20 corr = d9lgmc(q) - d9lgmc(p+q)
51 dlbeta = dlngam(p) + corr + p - p*
log(p+q)
52 1 + (q-0.5d0)*
dlnrel(-p/(p+q))
57 30 corr = d9lgmc(p) + d9lgmc(q) - d9lgmc(p+q)
58 dlbeta = -0.5d0*
log(q) + sq2pil + corr + (p-0.5d0)*
log(p/(p+q))
octave_value log(void) const
double precision function dlbeta(A, B)
double precision function dlnrel(X)
charNDArray max(char d, const charNDArray &m)
subroutine xermsg(LIBRAR, SUBROU, MESSG, NERR, LEVEL)
charNDArray min(char d, const charNDArray &m)