172 SUBROUTINE stpt05( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, X, LDX,
173 $ XACT, LDXACT, FERR, BERR, RESLTS )
180 CHARACTER DIAG, TRANS, UPLO
181 INTEGER LDB, LDX, LDXACT, N, NRHS
184 REAL AP( * ), B( LDB, * ), BERR( * ), FERR( * ),
185 $ reslts( * ), x( ldx, * ), xact( ldxact, * )
192 parameter( zero = 0.0e+0, one = 1.0e+0 )
195 LOGICAL NOTRAN, UNIT, UPPER
196 INTEGER I, IFU, IMAX, J, JC, K
197 REAL AXBI, DIFF, EPS, ERRBND, OVFL, TMP, UNFL, XNORM
203 EXTERNAL lsame, isamax, slamch
206 INTRINSIC abs, max, min
212 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
218 eps = slamch(
'Epsilon' )
219 unfl = slamch(
'Safe minimum' )
221 upper = lsame( uplo,
'U' )
222 notran = lsame( trans,
'N' )
223 unit = lsame( diag,
'U' )
231 imax = isamax( n, x( 1, j ), 1 )
232 xnorm = max( abs( x( imax, j ) ), unfl )
235 diff = max( diff, abs( x( i, j )-xact( i, j ) ) )
238 IF( xnorm.GT.one )
THEN
240 ELSE IF( diff.LE.ovfl*xnorm )
THEN
248 IF( diff / xnorm.LE.ferr( j ) )
THEN
249 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
264 tmp = abs( b( i, k ) )
266 jc = ( ( i-1 )*i ) / 2
267 IF( .NOT.notran )
THEN
269 tmp = tmp + abs( ap( jc+j ) )*abs( x( j, k ) )
272 $ tmp = tmp + abs( x( i, k ) )
276 tmp = tmp + abs( x( i, k ) )
280 tmp = tmp + abs( ap( jc ) )*abs( x( j, k ) )
288 tmp = tmp + abs( ap( jc ) )*abs( x( j, k ) )
292 $ tmp = tmp + abs( x( i, k ) )
294 jc = ( i-1 )*( n-i ) + ( i*( i+1 ) ) / 2
296 $ tmp = tmp + abs( x( i, k ) )
298 tmp = tmp + abs( ap( jc+j-i ) )*abs( x( j, k ) )
305 axbi = min( axbi, tmp )
308 tmp = berr( k ) / ( ( n+1 )*eps+( n+1 )*unfl /
309 $ max( axbi, ( n+1 )*unfl ) )
313 reslts( 2 ) = max( reslts( 2 ), tmp )
subroutine stpt05(uplo, trans, diag, n, nrhs, ap, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
STPT05