3 DOUBLE PRECISION FUNCTION dbetai (X, PIN, QIN)
37 DOUBLE PRECISION X, PIN, QIN, ALNEPS, ALNSML, C, EPS, FINSUM, P,
38 1 ps, q, sml, term, xb,
xi, y, d1mach,
dlbeta, p1
40 SAVE eps, alneps, sml, alnsml, first
51 IF (x .LT. 0.d0 .OR. x .GT. 1.d0) CALL
xermsg(
'SLATEC',
'DBETAI',
52 +
'X IS NOT IN THE RANGE (0,1)', 1, 2)
53 IF (pin .LE. 0.d0 .OR. qin .LE. 0.d0) CALL
xermsg(
'SLATEC',
54 +
'DBETAI',
'P AND/OR Q IS LE ZERO', 2, 2)
59 IF (q.LE.p .AND. x.LT.0.8d0) go
to 20
60 IF (x.LT.0.2d0) go
to 20
65 20
IF ((p+q)*y/(p+1.d0).LT.eps) go
to 80
71 IF (ps.EQ.0.d0) ps = 1.0d0
74 IF (xb.LT.alnsml) go
to 40
78 IF (ps.EQ.1.0d0) go
to 40
79 n =
max(alneps/
log(y), 4.0d0)
82 term = term * (
xi-ps)*y/
xi
88 40
IF (q.LE.1.0d0) go
to 70
91 ib =
max(xb/alnsml, 0.0d0)
92 term =
exp(xb - ib*alnsml)
98 IF (q.EQ.dble(n)) n = n - 1
100 IF (p1.LE.1.0d0 .AND. term/eps.LE.finsum) go
to 60
102 term = (q-
xi+1.0d0)*c*term/(p+q-
xi)
104 IF (term.GT.1.0d0) ib = ib - 1
105 IF (term.GT.1.0d0) term = term*sml
107 IF (ib.EQ.0) finsum = finsum + term
117 IF (xb.GT.alnsml .AND. y.NE.0.0d0)
dbetai =
exp(xb)
OCTAVE_EXPORT octave_value_list or N dimensional array whose elements are all equal to the base of natural logarithms The constant ex $e satisfies the equation log(e)
double precision function dlbeta(A, B)
may be zero for pure relative error test tem the relative tolerance must be greater than or equal to
charNDArray max(char d, const charNDArray &m)
subroutine xermsg(LIBRAR, SUBROU, MESSG, NERR, LEVEL)
double precision function dbetai(X, PIN, QIN)
static const double xi[33]
charNDArray min(char d, const charNDArray &m)