90 SUBROUTINE zqrt13( SCALE, M, N, A, LDA, NORMA, ISEED )
97 INTEGER LDA, M, N, SCALE
98 DOUBLE PRECISION NORMA
102 COMPLEX*16 A( LDA, * )
109 parameter( one = 1.0d0 )
113 DOUBLE PRECISION BIGNUM, SMLNUM
116 DOUBLE PRECISION DLAMCH, DZASUM, ZLANGE
117 EXTERNAL dlamch, dzasum, zlange
123 INTRINSIC dble, dcmplx, sign
126 DOUBLE PRECISION DUMMY( 1 )
130 IF( m.LE.0 .OR. n.LE.0 )
136 CALL zlarnv( 2, iseed, m, a( 1, j ) )
138 a( j, j ) = a( j, j ) + dcmplx( sign( dzasum( m, a( 1, j ),
139 $ 1 ), dble( a( j, j ) ) ) )
145 IF( scale.NE.1 )
THEN
146 norma = zlange(
'Max', m, n, a, lda, dummy )
147 smlnum = dlamch(
'Safe minimum' )
148 bignum = one / smlnum
149 smlnum = smlnum / dlamch(
'Epsilon' )
150 bignum = one / smlnum
152 IF( scale.EQ.2 )
THEN
156 CALL zlascl(
'General', 0, 0, norma, bignum, m, n, a, lda,
158 ELSE IF( scale.EQ.3 )
THEN
162 CALL zlascl(
'General', 0, 0, norma, smlnum, m, n, a, lda,
167 norma = zlange(
'One-norm', m, n, a, lda, dummy )
subroutine zlarnv(idist, iseed, n, x)
ZLARNV returns a vector of random numbers from a uniform or normal distribution.
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.
subroutine zqrt13(scale, m, n, a, lda, norma, iseed)
ZQRT13