173 SUBROUTINE dtprfs( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, X, LDX,
174 $ FERR, BERR, WORK, IWORK, INFO )
181 CHARACTER DIAG, TRANS, UPLO
182 INTEGER INFO, LDB, LDX, N, NRHS
186 DOUBLE PRECISION AP( * ), B( LDB, * ), BERR( * ), FERR( * ),
187 $ work( * ), x( ldx, * )
193 DOUBLE PRECISION ZERO
194 parameter( zero = 0.0d+0 )
196 parameter( one = 1.0d+0 )
199 LOGICAL NOTRAN, NOUNIT, UPPER
201 INTEGER I, J, K, KASE, KC, NZ
202 DOUBLE PRECISION EPS, LSTRES, S, SAFE1, SAFE2, SAFMIN, XK
215 DOUBLE PRECISION DLAMCH
216 EXTERNAL lsame, dlamch
223 upper = lsame( uplo,
'U' )
224 notran = lsame( trans,
'N' )
225 nounit = lsame( diag,
'N' )
227 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
229 ELSE IF( .NOT.notran .AND. .NOT.lsame( trans,
'T' ) .AND. .NOT.
230 $ lsame( trans,
'C' ) )
THEN
232 ELSE IF( .NOT.nounit .AND. .NOT.lsame( diag,
'U' ) )
THEN
234 ELSE IF( n.LT.0 )
THEN
236 ELSE IF( nrhs.LT.0 )
THEN
238 ELSE IF( ldb.LT.max( 1, n ) )
THEN
240 ELSE IF( ldx.LT.max( 1, n ) )
THEN
244 CALL xerbla(
'DTPRFS', -info )
250 IF( n.EQ.0 .OR. nrhs.EQ.0 )
THEN
267 eps = dlamch(
'Epsilon' )
268 safmin = dlamch(
'Safe minimum' )
279 CALL dcopy( n, x( 1, j ), 1, work( n+1 ), 1 )
280 CALL dtpmv( uplo, trans, diag, n, ap, work( n+1 ), 1 )
281 CALL daxpy( n, -one, b( 1, j ), 1, work( n+1 ), 1 )
293 work( i ) = abs( b( i, j ) )
304 xk = abs( x( k, j ) )
306 work( i ) = work( i ) + abs( ap( kc+i-1 ) )*xk
312 xk = abs( x( k, j ) )
314 work( i ) = work( i ) + abs( ap( kc+i-1 ) )*xk
316 work( k ) = work( k ) + xk
324 xk = abs( x( k, j ) )
326 work( i ) = work( i ) + abs( ap( kc+i-k ) )*xk
332 xk = abs( x( k, j ) )
334 work( i ) = work( i ) + abs( ap( kc+i-k ) )*xk
336 work( k ) = work( k ) + xk
351 s = s + abs( ap( kc+i-1 ) )*abs( x( i, j ) )
353 work( k ) = work( k ) + s
360 s = s + abs( ap( kc+i-1 ) )*abs( x( i, j ) )
362 work( k ) = work( k ) + s
372 s = s + abs( ap( kc+i-k ) )*abs( x( i, j ) )
374 work( k ) = work( k ) + s
381 s = s + abs( ap( kc+i-k ) )*abs( x( i, j ) )
383 work( k ) = work( k ) + s
391 IF( work( i ).GT.safe2 )
THEN
392 s = max( s, abs( work( n+i ) ) / work( i ) )
394 s = max( s, ( abs( work( n+i ) )+safe1 ) /
395 $ ( work( i )+safe1 ) )
423 IF( work( i ).GT.safe2 )
THEN
424 work( i ) = abs( work( n+i ) ) + nz*eps*work( i )
426 work( i ) = abs( work( n+i ) ) + nz*eps*work( i ) + safe1
432 CALL dlacn2( n, work( 2*n+1 ), work( n+1 ), iwork, ferr( j ),
439 CALL dtpsv( uplo, transt, diag, n, ap, work( n+1 ), 1 )
441 work( n+i ) = work( i )*work( n+i )
448 work( n+i ) = work( i )*work( n+i )
450 CALL dtpsv( uplo, trans, diag, n, ap, work( n+1 ), 1 )
459 lstres = max( lstres, abs( x( i, j ) ) )
462 $ ferr( j ) = ferr( j ) / lstres
subroutine xerbla(srname, info)
subroutine daxpy(n, da, dx, incx, dy, incy)
DAXPY
subroutine dcopy(n, dx, incx, dy, incy)
DCOPY
subroutine dlacn2(n, v, x, isgn, est, kase, isave)
DLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vec...
subroutine dtpmv(uplo, trans, diag, n, ap, x, incx)
DTPMV
subroutine dtprfs(uplo, trans, diag, n, nrhs, ap, b, ldb, x, ldx, ferr, berr, work, iwork, info)
DTPRFS
subroutine dtpsv(uplo, trans, diag, n, ap, x, incx)
DTPSV