107 SUBROUTINE slasq1( N, D, E, WORK, INFO )
117 REAL D( * ), E( * ), WORK( * )
124 parameter( zero = 0.0e0 )
128 REAL EPS, SCALE, SAFMIN, SIGMN, SIGMX
138 INTRINSIC abs, max, sqrt
145 CALL xerbla(
'SLASQ1', -info )
147 ELSE IF( n.EQ.0 )
THEN 149 ELSE IF( n.EQ.1 )
THEN 150 d( 1 ) = abs( d( 1 ) )
152 ELSE IF( n.EQ.2 )
THEN 153 CALL slas2( d( 1 ), e( 1 ), d( 2 ), sigmn, sigmx )
163 d( i ) = abs( d( i ) )
164 sigmx = max( sigmx, abs( e( i ) ) )
166 d( n ) = abs( d( n ) )
170 IF( sigmx.EQ.zero )
THEN 171 CALL slasrt(
'D', n, d, iinfo )
176 sigmx = max( sigmx, d( i ) )
182 eps = slamch(
'Precision' )
183 safmin = slamch(
'Safe minimum' )
184 scale = sqrt( eps / safmin )
185 CALL scopy( n, d, 1, work( 1 ), 2 )
186 CALL scopy( n-1, e, 1, work( 2 ), 2 )
187 CALL slascl(
'G', 0, 0, sigmx, scale, 2*n-1, 1, work, 2*n-1,
193 work( i ) = work( i )**2
197 CALL slasq2( n, work, info )
201 d( i ) = sqrt( work( i ) )
203 CALL slascl(
'G', 0, 0, scale, sigmx, n, 1, d, n, iinfo )
204 ELSE IF( info.EQ.2 )
THEN 210 d( i ) = sqrt( work( 2*i-1 ) )
211 e( i ) = sqrt( work( 2*i ) )
213 CALL slascl(
'G', 0, 0, scale, sigmx, n, 1, d, n, iinfo )
214 CALL slascl(
'G', 0, 0, scale, sigmx, n, 1, e, n, iinfo )
subroutine slasrt(ID, N, D, INFO)
SLASRT sorts numbers in increasing or decreasing order.
subroutine xerbla(SRNAME, INFO)
XERBLA
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 scopy(N, SX, INCX, SY, INCY)
SCOPY
subroutine slasq1(N, D, E, WORK, INFO)
SLASQ1 computes the singular values of a real square bidiagonal matrix. Used by sbdsqr.
subroutine slas2(F, G, H, SSMIN, SSMAX)
SLAS2 computes singular values of a 2-by-2 triangular matrix.
subroutine slasq2(N, Z, INFO)
SLASQ2 computes all the eigenvalues of the symmetric positive definite tridiagonal matrix associated ...