309 SUBROUTINE zppsvx( FACT, UPLO, N, NRHS, AP, AFP, EQUED, S, B, LDB,
310 $ X, LDX, RCOND, FERR, BERR, WORK, RWORK, INFO )
317 CHARACTER EQUED, FACT, UPLO
318 INTEGER INFO, LDB, LDX, N, NRHS
319 DOUBLE PRECISION RCOND
322 DOUBLE PRECISION BERR( * ), FERR( * ), RWORK( * ), S( * )
323 COMPLEX*16 AFP( * ), AP( * ), B( LDB, * ), WORK( * ),
330 DOUBLE PRECISION ZERO, ONE
331 parameter( zero = 0.0d+0, one = 1.0d+0 )
334 LOGICAL EQUIL, NOFACT, RCEQU
336 DOUBLE PRECISION AMAX, ANORM, BIGNUM, SCOND, SMAX, SMIN, SMLNUM
340 DOUBLE PRECISION DLAMCH, ZLANHP
341 EXTERNAL lsame, dlamch, zlanhp
353 nofact = lsame( fact,
'N' )
354 equil = lsame( fact,
'E' )
355 IF( nofact .OR. equil )
THEN
359 rcequ = lsame( equed,
'Y' )
360 smlnum = dlamch(
'Safe minimum' )
361 bignum = one / smlnum
366 IF( .NOT.nofact .AND. .NOT.equil .AND. .NOT.lsame( fact,
'F' ) )
369 ELSE IF( .NOT.lsame( uplo,
'U' ) .AND. .NOT.lsame( uplo,
'L' ) )
372 ELSE IF( n.LT.0 )
THEN
374 ELSE IF( nrhs.LT.0 )
THEN
376 ELSE IF( lsame( fact,
'F' ) .AND. .NOT.
377 $ ( rcequ .OR. lsame( equed,
'N' ) ) )
THEN
384 smin = min( smin, s( j ) )
385 smax = max( smax, s( j ) )
387 IF( smin.LE.zero )
THEN
389 ELSE IF( n.GT.0 )
THEN
390 scond = max( smin, smlnum ) / min( smax, bignum )
396 IF( ldb.LT.max( 1, n ) )
THEN
398 ELSE IF( ldx.LT.max( 1, n ) )
THEN
405 CALL xerbla(
'ZPPSVX', -info )
413 CALL zppequ( uplo, n, ap, s, scond, amax, infequ )
414 IF( infequ.EQ.0 )
THEN
418 CALL zlaqhp( uplo, n, ap, s, scond, amax, equed )
419 rcequ = lsame( equed,
'Y' )
428 b( i, j ) = s( i )*b( i, j )
433 IF( nofact .OR. equil )
THEN
437 CALL zcopy( n*( n+1 ) / 2, ap, 1, afp, 1 )
438 CALL zpptrf( uplo, n, afp, info )
450 anorm = zlanhp(
'I', uplo, n, ap, rwork )
454 CALL zppcon( uplo, n, afp, anorm, rcond, work, rwork, info )
458 CALL zlacpy(
'Full', n, nrhs, b, ldb, x, ldx )
459 CALL zpptrs( uplo, n, nrhs, afp, x, ldx, info )
464 CALL zpprfs( uplo, n, nrhs, ap, afp, b, ldb, x, ldx, ferr, berr,
465 $ work, rwork, info )
473 x( i, j ) = s( i )*x( i, j )
477 ferr( j ) = ferr( j ) / scond
483 IF( rcond.LT.dlamch(
'Epsilon' ) )
subroutine xerbla(srname, info)
subroutine zcopy(n, zx, incx, zy, incy)
ZCOPY
subroutine zlacpy(uplo, m, n, a, lda, b, ldb)
ZLACPY copies all or part of one two-dimensional array to another.
subroutine zlaqhp(uplo, n, ap, s, scond, amax, equed)
ZLAQHP scales a Hermitian matrix stored in packed form.
subroutine zppcon(uplo, n, ap, anorm, rcond, work, rwork, info)
ZPPCON
subroutine zppequ(uplo, n, ap, s, scond, amax, info)
ZPPEQU
subroutine zpprfs(uplo, n, nrhs, ap, afp, b, ldb, x, ldx, ferr, berr, work, rwork, info)
ZPPRFS
subroutine zppsvx(fact, uplo, n, nrhs, ap, afp, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info)
ZPPSVX computes the solution to system of linear equations A * X = B for OTHER matrices
subroutine zpptrf(uplo, n, ap, info)
ZPPTRF
subroutine zpptrs(uplo, n, nrhs, ap, b, ldb, info)
ZPPTRS