1 SUBROUTINE clarnv( IDIST, ISEED, N, X )
57 parameter( zero = 0.0e+0, one = 1.0e+0, two = 2.0e+0 )
61 parameter( twopi = 6.2831853071795864769252867663e+0 )
77 DO 60 iv = 1, n, lv / 2
78 il =
min( lv / 2, n-iv+1 )
83 CALL slaruv( iseed, 2*il, u )
90 x( iv+i-1 ) =
cmplx( u( 2*i-1 ), u( 2*i ) )
92 ELSE IF( idist.EQ.2 )
THEN
97 x( iv+i-1 ) =
cmplx( two*u( 2*i-1 )-one,
100 ELSE IF( idist.EQ.3 )
THEN
105 x( iv+i-1 ) = sqrt( -two*log( u( 2*i-1 ) ) )*
106 $ exp(
cmplx( zero, twopi*u( 2*i ) ) )
108 ELSE IF( idist.EQ.4 )
THEN
114 x( iv+i-1 ) = sqrt( u( 2*i-1 ) )*
115 $ exp(
cmplx( zero, twopi*u( 2*i ) ) )
117 ELSE IF( idist.EQ.5 )
THEN
123 x( iv+i-1 ) = exp(
cmplx( zero, twopi*u( 2*i ) ) )