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

DQRT13

Purpose:
``` DQRT13 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 DOUBLE PRECISION 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```
Date
November 2011

Definition at line 93 of file dqrt13.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  DOUBLE PRECISION 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 dasum, dlamch, dlange
120  EXTERNAL dasum, dlamch, dlange
121 * ..
122 * .. External Subroutines ..
124 * ..
125 * .. Intrinsic Functions ..
126  INTRINSIC 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 dlarnv( 2, iseed, m, a( 1, j ) )
140  IF( j.LE.m ) THEN
141  a( j, j ) = a( j, j ) + sign( dasum( m, a( 1, j ), 1 ),
142  \$ a( j, j ) )
143  END IF
144  10 CONTINUE
145 *
146 * scaled versions
147 *
148  IF( scale.NE.1 ) THEN
149  norma = dlange( '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 dlascl( '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 dlascl( 'General', 0, 0, norma, smlnum, m, n, a, lda,
167  \$ info )
168  END IF
169  END IF
170 *
171  norma = dlange( 'One-norm', m, n, a, lda, dummy )
172  RETURN
173 *
174 * End of DQRT13
175 *
double precision function dlamch(CMACH)
DLAMCH
Definition: dlamch.f:65
subroutine dlascl(TYPE, KL, KU, CFROM, CTO, M, N, A, LDA, INFO)
DLASCL multiplies a general rectangular matrix by a real scalar defined as cto/cfrom.
Definition: dlascl.f:145