* G05MBF Example Program Text * Mark 20 Release. NAG Copyright 2001. * .. Parameters .. INTEGER NOUT, N, NR PARAMETER (NOUT=6,N=10,NR=40000) * .. Local Scalars .. DOUBLE PRECISION P INTEGER IFAIL, IGEN * .. Local Arrays .. DOUBLE PRECISION R(NR) INTEGER ISEED(4), X(N) * .. External Subroutines .. EXTERNAL G05KBF, G05MBF * .. Executable Statements .. WRITE (NOUT,*) 'G05MBF Example Program Results' WRITE (NOUT,*) * Set the distribution parameter P P = 0.001D0 * Initialise the seed to a repeatable sequence ISEED(1) = 1762543 ISEED(2) = 9324783 ISEED(3) = 423441 ISEED(4) = 742355 * IGEN identifies the stream. IGEN = 1 CALL G05KBF(IGEN,ISEED) * Choose MODE = 3 because P is close to 0 IFAIL = 0 CALL G05MBF(3,P,N,X,IGEN,ISEED,R,NR,IFAIL) * WRITE (NOUT,99999) X STOP * 99999 FORMAT (1X,I12) END