192 SUBROUTINE ssytf2( UPLO, N, A, LDA, IPIV, INFO )
211 parameter( zero = 0.0e+0, one = 1.0e+0 )
213 parameter( eight = 8.0e+0, sevten = 17.0e+0 )
217 INTEGER I, IMAX, J, JMAX, K, KK, KP, KSTEP
218 REAL ABSAKK, ALPHA, COLMAX, D11, D12, D21, D22, R1,
219 $ ROWMAX, T, WK, WKM1, WKP1
222 LOGICAL LSAME, SISNAN
224 EXTERNAL lsame, isamax, sisnan
230 INTRINSIC abs, max, sqrt
237 upper = lsame( uplo,
'U' )
238 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
240 ELSE IF( n.LT.0 )
THEN
242 ELSE IF( lda.LT.max( 1, n ) )
THEN
246 CALL xerbla(
'SSYTF2', -info )
252 alpha = ( one+sqrt( sevten ) ) / eight
273 absakk = abs( a( k, k ) )
280 imax = isamax( k-1, a( 1, k ), 1 )
281 colmax = abs( a( imax, k ) )
286 IF( (max( absakk, colmax ).EQ.zero) .OR.
287 $ sisnan(absakk) )
THEN
296 IF( absakk.GE.alpha*colmax )
THEN
306 jmax = imax + isamax( k-imax, a( imax, imax+1 ), lda )
307 rowmax = abs( a( imax, jmax ) )
309 jmax = isamax( imax-1, a( 1, imax ), 1 )
310 rowmax = max( rowmax, abs( a( jmax, imax ) ) )
313 IF( absakk.GE.alpha*colmax*( colmax / rowmax ) )
THEN
318 ELSE IF( abs( a( imax, imax ) ).GE.alpha*rowmax )
THEN
340 CALL sswap( kp-1, a( 1, kk ), 1, a( 1, kp ), 1 )
341 CALL sswap( kk-kp-1, a( kp+1, kk ), 1, a( kp, kp+1 ),
344 a( kk, kk ) = a( kp, kp )
346 IF( kstep.EQ.2 )
THEN
348 a( k-1, k ) = a( kp, k )
355 IF( kstep.EQ.1 )
THEN
368 CALL ssyr( uplo, k-1, -r1, a( 1, k ), 1, a, lda )
372 CALL sscal( k-1, r1, a( 1, k ), 1 )
390 d22 = a( k-1, k-1 ) / d12
391 d11 = a( k, k ) / d12
392 t = one / ( d11*d22-one )
395 DO 30 j = k - 2, 1, -1
396 wkm1 = d12*( d11*a( j, k-1 )-a( j, k ) )
397 wk = d12*( d22*a( j, k )-a( j, k-1 ) )
399 a( i, j ) = a( i, j ) - a( i, k )*wk -
413 IF( kstep.EQ.1 )
THEN
444 absakk = abs( a( k, k ) )
451 imax = k + isamax( n-k, a( k+1, k ), 1 )
452 colmax = abs( a( imax, k ) )
457 IF( (max( absakk, colmax ).EQ.zero) .OR.
458 $ sisnan(absakk) )
THEN
467 IF( absakk.GE.alpha*colmax )
THEN
477 jmax = k - 1 + isamax( imax-k, a( imax, k ), lda )
478 rowmax = abs( a( imax, jmax ) )
480 jmax = imax + isamax( n-imax, a( imax+1, imax ),
482 rowmax = max( rowmax, abs( a( jmax, imax ) ) )
485 IF( absakk.GE.alpha*colmax*( colmax / rowmax ) )
THEN
490 ELSE IF( abs( a( imax, imax ) ).GE.alpha*rowmax )
THEN
513 $
CALL sswap( n-kp, a( kp+1, kk ), 1, a( kp+1, kp ),
515 CALL sswap( kp-kk-1, a( kk+1, kk ), 1, a( kp, kk+1 ),
518 a( kk, kk ) = a( kp, kp )
520 IF( kstep.EQ.2 )
THEN
522 a( k+1, k ) = a( kp, k )
529 IF( kstep.EQ.1 )
THEN
543 d11 = one / a( k, k )
544 CALL ssyr( uplo, n-k, -d11, a( k+1, k ), 1,
545 $ a( k+1, k+1 ), lda )
549 CALL sscal( n-k, d11, a( k+1, k ), 1 )
565 d11 = a( k+1, k+1 ) / d21
566 d22 = a( k, k ) / d21
567 t = one / ( d11*d22-one )
572 wk = d21*( d11*a( j, k )-a( j, k+1 ) )
573 wkp1 = d21*( d22*a( j, k+1 )-a( j, k ) )
576 a( i, j ) = a( i, j ) - a( i, k )*wk -
590 IF( kstep.EQ.1 )
THEN