1CLARNV(1) LAPACK auxiliary routine (version 3.2) CLARNV(1)
2
3
4
6 CLARNV - returns a vector of n random complex numbers from a uniform or
7 normal distribution
8
10 SUBROUTINE CLARNV( IDIST, ISEED, N, X )
11
12 INTEGER IDIST, N
13
14 INTEGER ISEED( 4 )
15
16 COMPLEX X( * )
17
19 CLARNV returns a vector of n random complex numbers from a uniform or
20 normal distribution.
21
23 IDIST (input) INTEGER
24 Specifies the distribution of the random numbers:
25 = 1: real and imaginary parts each uniform (0,1)
26 = 2: real and imaginary parts each uniform (-1,1)
27 = 3: real and imaginary parts each normal (0,1)
28 = 4: uniformly distributed on the disc abs(z) < 1
29 = 5: uniformly distributed on the circle abs(z) = 1
30
31 ISEED (input/output) INTEGER array, dimension (4)
32 On entry, the seed of the random number generator; the array
33 elements must be between 0 and 4095, and ISEED(4) must be odd.
34 On exit, the seed is updated.
35
36 N (input) INTEGER
37 The number of random numbers to be generated.
38
39 X (output) COMPLEX array, dimension (N)
40 The generated random numbers.
41
43 This routine calls the auxiliary routine SLARUV to generate random real
44 numbers from a uniform (0,1) distribution, in batches of up to 128
45 using vectorisable code. The Box-Muller method is used to transform
46 numbers from a uniform to a normal distribution.
47
48
49
50 LAPACK auxiliary routine (versionNo3v.e2m)ber 2008 CLARNV(1)