98 SUBROUTINE slarnv( IDIST, ISEED, N, X )
117 parameter( one = 1.0e+0, two = 2.0e+0 )
119 parameter( lv = 128 )
121 parameter( twopi = 6.2831853071795864769252867663e+0 )
124 INTEGER i, il, il2, iv
130 INTRINSIC cos, log, min, sqrt
137 DO 40 iv = 1, n, lv / 2
138 il = min( lv / 2, n-iv+1 )
139 IF( idist.EQ.3 )
THEN
148 CALL
slaruv( iseed, il2, u )
150 IF( idist.EQ.1 )
THEN
157 ELSE IF( idist.EQ.2 )
THEN
162 x( iv+i-1 ) = two*u( i ) - one
164 ELSE IF( idist.EQ.3 )
THEN
169 x( iv+i-1 ) = sqrt( -two*log( u( 2*i-1 ) ) )*
170 $ cos( twopi*u( 2*i ) )