92 SUBROUTINE zqrt13( SCALE, M, N, A, LDA, NORMA, ISEED )
100 INTEGER LDA, M, N, SCALE
101 DOUBLE PRECISION NORMA
105 COMPLEX*16 A( lda, * )
112 parameter ( one = 1.0d0 )
116 DOUBLE PRECISION BIGNUM, SMLNUM
119 DOUBLE PRECISION DLAMCH, DZASUM, ZLANGE
120 EXTERNAL dlamch, dzasum, zlange
126 INTRINSIC dble, dcmplx, sign
129 DOUBLE PRECISION DUMMY( 1 )
133 IF( m.LE.0 .OR. n.LE.0 )
139 CALL zlarnv( 2, iseed, m, a( 1, j ) )
141 a( j, j ) = a( j, j ) + dcmplx( sign( dzasum( m, a( 1, j ),
142 $ 1 ), dble( a( j, j ) ) ) )
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
156 IF( scale.EQ.2 )
THEN
160 CALL zlascl(
'General', 0, 0, norma, bignum, m, n, a, lda,
162 ELSE IF( scale.EQ.3 )
THEN
166 CALL zlascl(
'General', 0, 0, norma, smlnum, m, n, a, lda,
171 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 dlabad(SMALL, LARGE)
DLABAD
subroutine zqrt13(SCALE, M, N, A, LDA, NORMA, ISEED)
ZQRT13
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.