181 SUBROUTINE strt05( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB, X,
182 $ ldx, xact, ldxact, ferr, berr, reslts )
190 CHARACTER diag, trans, uplo
191 INTEGER lda, ldb, ldx, ldxact, n, nrhs
194 REAL a( lda, * ), b( ldb, * ), berr( * ), ferr( * ),
195 $ reslts( * ), x( ldx, * ), xact( ldxact, * )
202 parameter( zero = 0.0e+0, one = 1.0e+0 )
205 LOGICAL notran, unit, upper
206 INTEGER i, ifu, imax, j, k
207 REAL axbi, diff, eps, errbnd, ovfl, tmp, unfl, xnorm
216 INTRINSIC abs, max, min
222 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
229 unfl =
slamch(
'Safe minimum' )
231 upper =
lsame( uplo,
'U' )
232 notran =
lsame( trans,
'N' )
233 unit =
lsame( diag,
'U' )
241 imax =
isamax( n, x( 1, j ), 1 )
242 xnorm = max( abs( x( imax, j ) ), unfl )
245 diff = max( diff, abs( x( i, j )-xact( i, j ) ) )
248 IF( xnorm.GT.one )
THEN
250 ELSE IF( diff.LE.ovfl*xnorm )
THEN
258 IF( diff / xnorm.LE.ferr( j ) )
THEN
259 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
274 tmp = abs( b( i, k ) )
276 IF( .NOT.notran )
THEN
278 tmp = tmp + abs( a( j, i ) )*abs( x( j, k ) )
281 $ tmp = tmp + abs( x( i, k ) )
284 $ tmp = tmp + abs( x( i, k ) )
286 tmp = tmp + abs( a( i, j ) )*abs( x( j, k ) )
292 tmp = tmp + abs( a( i, j ) )*abs( x( j, k ) )
295 $ tmp = tmp + abs( x( i, k ) )
298 $ tmp = tmp + abs( x( i, k ) )
300 tmp = tmp + abs( a( j, i ) )*abs( x( j, k ) )
307 axbi = min( axbi, tmp )
310 tmp = berr( k ) / ( ( n+1 )*eps+( n+1 )*unfl /
311 $ max( axbi, ( n+1 )*unfl ) )
315 reslts( 2 ) = max( reslts( 2 ), tmp )