90 SUBROUTINE sqrt13( SCALE, M, N, A, LDA, NORMA, ISEED )
97 INTEGER LDA, M, N, SCALE
109 parameter( one = 1.0e0 )
116 REAL SASUM, SLAMCH, SLANGE
117 EXTERNAL sasum, slamch, slange
130 IF( m.LE.0 .OR. n.LE.0 )
136 CALL slarnv( 2, iseed, m, a( 1, j ) )
138 a( j, j ) = a( j, j ) + sign( sasum( m, a( 1, j ), 1 ),
145 IF( scale.NE.1 )
THEN
146 norma = slange(
'Max', m, n, a, lda, dummy )
147 smlnum = slamch(
'Safe minimum' )
148 bignum = one / smlnum
149 smlnum = smlnum / slamch(
'Epsilon' )
150 bignum = one / smlnum
152 IF( scale.EQ.2 )
THEN
156 CALL slascl(
'General', 0, 0, norma, bignum, m, n, a, lda,
158 ELSE IF( scale.EQ.3 )
THEN
162 CALL slascl(
'General', 0, 0, norma, smlnum, m, n, a, lda,
167 norma = slange(
'One-norm', m, n, a, lda, dummy )
subroutine slarnv(idist, iseed, n, x)
SLARNV returns a vector of random numbers from a uniform or normal distribution.
subroutine slascl(type, kl, ku, cfrom, cto, m, n, a, lda, info)
SLASCL multiplies a general rectangular matrix by a real scalar defined as cto/cfrom.
subroutine sqrt13(scale, m, n, a, lda, norma, iseed)
SQRT13