1 DOUBLE COMPLEX FUNCTION zlarnd( IDIST, ISEED )
47 DOUBLE PRECISION zero, one, two
48 parameter( zero = 0.0d+0, one = 1.0d+0, two = 2.0d+0 )
49 DOUBLE PRECISION twopi
50 parameter( twopi = 6.2831853071795864769252867663d+0 )
53 DOUBLE PRECISION t1, t2
60 INTRINSIC dcmplx, exp, log, sqrt
75 ELSE IF( idist.EQ.2 )
THEN
79 zlarnd = dcmplx( two*t1-one, two*t2-one )
80 ELSE IF( idist.EQ.3 )
THEN
84 zlarnd = sqrt( -two*log( t1 ) )*exp( dcmplx( zero, twopi*t2 ) )
85 ELSE IF( idist.EQ.4 )
THEN
89 zlarnd = sqrt( t1 )*exp( dcmplx( zero, twopi*t2 ) )
90 ELSE IF( idist.EQ.5 )
THEN
94 zlarnd = exp( dcmplx( zero, twopi*t2 ) )