By B.V. Cordingley, D.J. Chamund

ISBN-10: 0333435699

ISBN-13: 9780333435694

ISBN-10: 1349092827

ISBN-13: 9781349092826

Best languages & tools books

New PDF release: Categories, Types, and Structures: An Introduction to

Type thought is a mathematical topic whose value in numerous components of machine technology, so much significantly the semantics of programming languages and the layout of programmes utilizing summary information kinds, is greatly said. This ebook introduces type conception at a degree acceptable for machine scientists and offers functional examples within the context of programming language layout.

Example text

At the extremes of the distribution, local variable Kl will be zero. In this case execution is not terminated though a warning is printed indicating that the value returned for GRAT is not correct. The major use for this subroutine is likely to be in significance testing and in this application it is unlikely that extreme values for GRAT will be required. 37 The Subroutines RATIO OF THE INCOMPLETE BETA FUNCTION Subroutine: BETAFN Description Evaluates the ratio of the incomplete beta function Ix(P, q) to the complete function B(p, q) for p > 0, q > 0, 0 < x < 1.

Requires subroutine LNGAMM. Method The ratio is defmed Ix(p, q) = (I/B(P, q)) f: t p - 1 (1 - t)q -1 dt (1) where B(p, q) = (r(p)r(q»/r(p + q) The subroutine described in this section is adapted from that published in FORTRAN by Majumder and Bhattacharjee (Griffiths and Hill, 1985c). Ix(P, q) in (1) is integrated by parts. Ifp ~ (p + q)x, the resulting series I (p q) = x , r(p + q)xP(1 - X)q-1 + I (p + 1 q _ rep + 1) rep) x , 1) (2) is evaluated up to s times where s = INT(q + (1 -x) (p + q» (3) The process is continued if necessary with the aid of the recurrence relation: Ix(p+s,q-s)=: rep + q)xP+S(1 x)q-s +Ix(p+s+l,q-s) r(p + s + 1) r(q - s) (4) If (3) does not produce a positive integer then only equation (4) is employed.

5ln(27T) + ~ n=l :n_ (l)n-l B - 2n(2n - 1)x n 1 where B 2n are the Bernoulli numbers. Subroutine Listing 2000 2010 2020 2030 2040 2050 2060 2070 2080 2090 2100 2110 2120 2130 2140 2150 2160 2170 REM REM REM REM REM REM REM REM REM REM REM REM REM REM REM REM REM REM NATURAL LOGARITHM OF GAMMA FUNCTION SUBROUTINE: LNGAMM EVALUATES THE NATURAL LOGARITHM OF THE GAMMA FUNCTION FOR PARAMETER ALPHA FOR ALPHA> O. • GAMMA PARAMETER OUTPUT: NLGGAM .. NATURAL LOGARITHM OF GAMMA(ALPHA) LOCAL: ... 62. 3 1 1.