173 SUBROUTINE stprfs( 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 REAL AP( * ), B( LDB, * ), BERR( * ), FERR( * ),
187 $ work( * ), x( ldx, * )
194 parameter( zero = 0.0e+0 )
196 parameter( one = 1.0e+0 )
199 LOGICAL NOTRAN, NOUNIT, UPPER
201 INTEGER I, J, K, KASE, KC, NZ
202 REAL EPS, LSTRES, S, SAFE1, SAFE2, SAFMIN, XK
216 EXTERNAL lsame, slamch
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(
'STPRFS', -info )
250 IF( n.EQ.0 .OR. nrhs.EQ.0 )
THEN
267 eps = slamch(
'Epsilon' )
268 safmin = slamch(
'Safe minimum' )
279 CALL scopy( n, x( 1, j ), 1, work( n+1 ), 1 )
280 CALL stpmv( uplo, trans, diag, n, ap, work( n+1 ), 1 )
281 CALL saxpy( 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 slacn2( n, work( 2*n+1 ), work( n+1 ), iwork, ferr( j ),
439 CALL stpsv( 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 stpsv( 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 saxpy(n, sa, sx, incx, sy, incy)
SAXPY
subroutine scopy(n, sx, incx, sy, incy)
SCOPY
subroutine slacn2(n, v, x, isgn, est, kase, isave)
SLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vec...
subroutine stpmv(uplo, trans, diag, n, ap, x, incx)
STPMV
subroutine stprfs(uplo, trans, diag, n, nrhs, ap, b, ldb, x, ldx, ferr, berr, work, iwork, info)
STPRFS
subroutine stpsv(uplo, trans, diag, n, ap, x, incx)
STPSV