92 SUBROUTINE cqrt13( SCALE, M, N, A, LDA, NORMA, ISEED )
100 INTEGER LDA, M, N, SCALE
112 parameter ( one = 1.0e0 )
119 REAL CLANGE, SCASUM, SLAMCH
120 EXTERNAL clange, scasum, slamch
126 INTRINSIC cmplx,
REAL, SIGN
133 IF( m.LE.0 .OR. n.LE.0 )
139 CALL clarnv( 2, iseed, m, a( 1, j ) )
141 a( j, j ) = a( j, j ) + cmplx( sign( scasum( m, a( 1, j ),
142 $ 1 ),
REAL( A( J, J ) ) ) )
148 IF( scale.NE.1 )
THEN
149 norma = clange(
'Max', m, n, a, lda, dummy )
150 smlnum = slamch(
'Safe minimum' )
151 bignum = one / smlnum
152 CALL slabad( smlnum, bignum )
153 smlnum = smlnum / slamch(
'Epsilon' )
154 bignum = one / smlnum
156 IF( scale.EQ.2 )
THEN
160 CALL clascl(
'General', 0, 0, norma, bignum, m, n, a, lda,
162 ELSE IF( scale.EQ.3 )
THEN
166 CALL clascl(
'General', 0, 0, norma, smlnum, m, n, a, lda,
171 norma = clange(
'One-norm', m, n, a, lda, dummy )
subroutine clascl(TYPE, KL, KU, CFROM, CTO, M, N, A, LDA, INFO)
CLASCL multiplies a general rectangular matrix by a real scalar defined as cto/cfrom.
subroutine slabad(SMALL, LARGE)
SLABAD
subroutine cqrt13(SCALE, M, N, A, LDA, NORMA, ISEED)
CQRT13
subroutine clarnv(IDIST, ISEED, N, X)
CLARNV returns a vector of random numbers from a uniform or normal distribution.