163 SUBROUTINE dptrfs( N, NRHS, D, E, DF, EF, B, LDB, X, LDX, FERR,
172 INTEGER INFO, LDB, LDX, N, NRHS
175 DOUBLE PRECISION B( ldb, * ), BERR( * ), D( * ), DF( * ),
176 $ e( * ), ef( * ), ferr( * ), work( * ),
184 parameter ( itmax = 5 )
185 DOUBLE PRECISION ZERO
186 parameter ( zero = 0.0d+0 )
188 parameter ( one = 1.0d+0 )
190 parameter ( two = 2.0d+0 )
191 DOUBLE PRECISION THREE
192 parameter ( three = 3.0d+0 )
195 INTEGER COUNT, I, IX, J, NZ
196 DOUBLE PRECISION BI, CX, DX, EPS, EX, LSTRES, S, SAFE1, SAFE2,
207 DOUBLE PRECISION DLAMCH
208 EXTERNAL idamax, dlamch
217 ELSE IF( nrhs.LT.0 )
THEN
219 ELSE IF( ldb.LT.max( 1, n ) )
THEN
221 ELSE IF( ldx.LT.max( 1, n ) )
THEN
225 CALL xerbla(
'DPTRFS', -info )
231 IF( n.EQ.0 .OR. nrhs.EQ.0 )
THEN
242 eps = dlamch(
'Epsilon' )
243 safmin = dlamch(
'Safe minimum' )
262 dx = d( 1 )*x( 1, j )
263 work( n+1 ) = bi - dx
264 work( 1 ) = abs( bi ) + abs( dx )
267 dx = d( 1 )*x( 1, j )
268 ex = e( 1 )*x( 2, j )
269 work( n+1 ) = bi - dx - ex
270 work( 1 ) = abs( bi ) + abs( dx ) + abs( ex )
273 cx = e( i-1 )*x( i-1, j )
274 dx = d( i )*x( i, j )
275 ex = e( i )*x( i+1, j )
276 work( n+i ) = bi - cx - dx - ex
277 work( i ) = abs( bi ) + abs( cx ) + abs( dx ) + abs( ex )
280 cx = e( n-1 )*x( n-1, j )
281 dx = d( n )*x( n, j )
282 work( n+n ) = bi - cx - dx
283 work( n ) = abs( bi ) + abs( cx ) + abs( dx )
297 IF( work( i ).GT.safe2 )
THEN
298 s = max( s, abs( work( n+i ) ) / work( i ) )
300 s = max( s, ( abs( work( n+i ) )+safe1 ) /
301 $ ( work( i )+safe1 ) )
312 IF( berr( j ).GT.eps .AND. two*berr( j ).LE.lstres .AND.
313 $ count.LE.itmax )
THEN
317 CALL dpttrs( n, 1, df, ef, work( n+1 ), n, info )
318 CALL daxpy( n, one, work( n+1 ), 1, x( 1, j ), 1 )
343 IF( work( i ).GT.safe2 )
THEN
344 work( i ) = abs( work( n+i ) ) + nz*eps*work( i )
346 work( i ) = abs( work( n+i ) ) + nz*eps*work( i ) + safe1
349 ix = idamax( n, work, 1 )
350 ferr( j ) = work( ix )
365 work( i ) = one + work( i-1 )*abs( ef( i-1 ) )
370 work( n ) = work( n ) / df( n )
371 DO 70 i = n - 1, 1, -1
372 work( i ) = work( i ) / df( i ) + work( i+1 )*abs( ef( i ) )
377 ix = idamax( n, work, 1 )
378 ferr( j ) = ferr( j )*abs( work( ix ) )
384 lstres = max( lstres, abs( x( i, j ) ) )
387 $ ferr( j ) = ferr( j ) / lstres
subroutine daxpy(N, DA, DX, INCX, DY, INCY)
DAXPY
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine dptrfs(N, NRHS, D, E, DF, EF, B, LDB, X, LDX, FERR, BERR, WORK, INFO)
DPTRFS
subroutine dpttrs(N, NRHS, D, E, B, LDB, INFO)
DPTTRS