LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
subroutine zqrt13 ( integer  SCALE,
integer  M,
integer  N,
complex*16, dimension( lda, * )  A,
integer  LDA,
double precision  NORMA,
integer, dimension( 4 )  ISEED 
)

ZQRT13

Purpose:
 ZQRT13 generates a full-rank matrix that may be scaled to have large
 or small norm.
Parameters
[in]SCALE
          SCALE is INTEGER
          SCALE = 1: normally scaled matrix
          SCALE = 2: matrix scaled up
          SCALE = 3: matrix scaled down
[in]M
          M is INTEGER
          The number of rows of the matrix A.
[in]N
          N is INTEGER
          The number of columns of A.
[out]A
          A is COMPLEX*16 array, dimension (LDA,N)
          The M-by-N matrix A.
[in]LDA
          LDA is INTEGER
          The leading dimension of the array A.
[out]NORMA
          NORMA is DOUBLE PRECISION
          The one-norm of A.
[in,out]ISEED
          ISEED is integer array, dimension (4)
          Seed for random number generator
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011

Definition at line 93 of file zqrt13.f.

93 *
94 * -- LAPACK test routine (version 3.4.0) --
95 * -- LAPACK is a software package provided by Univ. of Tennessee, --
96 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
97 * November 2011
98 *
99 * .. Scalar Arguments ..
100  INTEGER lda, m, n, scale
101  DOUBLE PRECISION norma
102 * ..
103 * .. Array Arguments ..
104  INTEGER iseed( 4 )
105  COMPLEX*16 a( lda, * )
106 * ..
107 *
108 * =====================================================================
109 *
110 * .. Parameters ..
111  DOUBLE PRECISION one
112  parameter ( one = 1.0d0 )
113 * ..
114 * .. Local Scalars ..
115  INTEGER info, j
116  DOUBLE PRECISION bignum, smlnum
117 * ..
118 * .. External Functions ..
119  DOUBLE PRECISION dlamch, dzasum, zlange
120  EXTERNAL dlamch, dzasum, zlange
121 * ..
122 * .. External Subroutines ..
123  EXTERNAL dlabad, zlarnv, zlascl
124 * ..
125 * .. Intrinsic Functions ..
126  INTRINSIC dble, dcmplx, sign
127 * ..
128 * .. Local Arrays ..
129  DOUBLE PRECISION dummy( 1 )
130 * ..
131 * .. Executable Statements ..
132 *
133  IF( m.LE.0 .OR. n.LE.0 )
134  $ RETURN
135 *
136 * benign matrix
137 *
138  DO 10 j = 1, n
139  CALL zlarnv( 2, iseed, m, a( 1, j ) )
140  IF( j.LE.m ) THEN
141  a( j, j ) = a( j, j ) + dcmplx( sign( dzasum( m, a( 1, j ),
142  $ 1 ), dble( a( j, j ) ) ) )
143  END IF
144  10 CONTINUE
145 *
146 * scaled versions
147 *
148  IF( scale.NE.1 ) THEN
149  norma = zlange( 'Max', m, n, a, lda, dummy )
150  smlnum = dlamch( 'Safe minimum' )
151  bignum = one / smlnum
152  CALL dlabad( smlnum, bignum )
153  smlnum = smlnum / dlamch( 'Epsilon' )
154  bignum = one / smlnum
155 *
156  IF( scale.EQ.2 ) THEN
157 *
158 * matrix scaled up
159 *
160  CALL zlascl( 'General', 0, 0, norma, bignum, m, n, a, lda,
161  $ info )
162  ELSE IF( scale.EQ.3 ) THEN
163 *
164 * matrix scaled down
165 *
166  CALL zlascl( 'General', 0, 0, norma, smlnum, m, n, a, lda,
167  $ info )
168  END IF
169  END IF
170 *
171  norma = zlange( 'One-norm', m, n, a, lda, dummy )
172  RETURN
173 *
174 * End of ZQRT13
175 *
subroutine zlarnv(IDIST, ISEED, N, X)
ZLARNV returns a vector of random numbers from a uniform or normal distribution.
Definition: zlarnv.f:101
double precision function dlamch(CMACH)
DLAMCH
Definition: dlamch.f:65
subroutine dlabad(SMALL, LARGE)
DLABAD
Definition: dlabad.f:76
double precision function zlange(NORM, M, N, A, LDA, WORK)
ZLANGE returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value ...
Definition: zlange.f:117
double precision function dzasum(N, ZX, INCX)
DZASUM
Definition: dzasum.f:54
subroutine zlascl(TYPE, KL, KU, CFROM, CTO, M, N, A, LDA, INFO)
ZLASCL multiplies a general rectangular matrix by a real scalar defined as cto/cfrom.
Definition: zlascl.f:145

Here is the call graph for this function:

Here is the caller graph for this function: