* G05MDF Example Program Text * Mark 20 Release. NAG Copyright 2001. * .. Parameters .. INTEGER NOUT, N, NR PARAMETER (NOUT=6,N=10,NR=1) * .. Local Scalars .. DOUBLE PRECISION A INTEGER I, IFAIL, IGEN * .. Local Arrays .. DOUBLE PRECISION R(NR) INTEGER ISEED(4), X(N) * .. External Subroutines .. EXTERNAL G05KBF, G05MDF * .. Executable Statements .. WRITE (NOUT,*) 'G05MDF Example Program Results' WRITE (NOUT,*) * Set the distribution parameter A A = 0.9999D0 * 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) IFAIL = 0 * Generate integers and store in X * Use MODE=3 because A > 0.95 CALL G05MDF(3,A,N,X,IGEN,ISEED,R,NR,IFAIL) * WRITE (NOUT,99999) (X(I),I=1,N) STOP * 99999 FORMAT (1X,I12) END