115 REAL D( * ), E( * ), WORK( * )
122 parameter( zero = 0.0e0 )
126 REAL EPS, SCALE, SAFMIN, SIGMN, SIGMX
137 INTRINSIC abs, max, sqrt
144 CALL xerbla(
'SLASQ1', -info )
146 ELSE IF( n.EQ.0 )
THEN
148 ELSE IF( n.EQ.1 )
THEN
149 d( 1 ) = abs( d( 1 ) )
151 ELSE IF( n.EQ.2 )
THEN
152 CALL slas2( d( 1 ), e( 1 ), d( 2 ), sigmn, sigmx )
162 d( i ) = abs( d( i ) )
163 sigmx = max( sigmx, abs( e( i ) ) )
165 d( n ) = abs( d( n ) )
169 IF( sigmx.EQ.zero )
THEN
170 CALL slasrt(
'D', n, d, iinfo )
175 sigmx = max( sigmx, d( i ) )
181 eps = slamch(
'Precision' )
182 safmin = slamch(
'Safe minimum' )
183 scale = sqrt( eps / safmin )
184 CALL scopy( n, d, 1, work( 1 ), 2 )
185 CALL scopy( n-1, e, 1, work( 2 ), 2 )
186 CALL slascl(
'G', 0, 0, sigmx, scale, 2*n-1, 1, work, 2*n-1,
192 work( i ) = work( i )**2
196 CALL slasq2( n, work, info )
200 d( i ) = sqrt( work( i ) )
202 CALL slascl(
'G', 0, 0, scale, sigmx, n, 1, d, n, iinfo )
203 ELSE IF( info.EQ.2 )
THEN
209 d( i ) = sqrt( work( 2*i-1 ) )
210 e( i ) = sqrt( work( 2*i ) )
212 CALL slascl(
'G', 0, 0, scale, sigmx, n, 1, d, n, iinfo )
213 CALL slascl(
'G', 0, 0, scale, sigmx, n, 1, e, n, iinfo )
subroutine slas2(f, g, h, ssmin, ssmax)
SLAS2 computes singular values of a 2-by-2 triangular matrix.
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 slasq1(n, d, e, work, info)
SLASQ1 computes the singular values of a real square bidiagonal matrix. Used by sbdsqr.
subroutine slasq2(n, z, info)
SLASQ2 computes all the eigenvalues of the symmetric positive definite tridiagonal matrix associated ...
subroutine slasrt(id, n, d, info)
SLASRT sorts numbers in increasing or decreasing order.