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