1CTPRFS(1) LAPACK routine (version 3.2) CTPRFS(1)
2
3
4
6 CTPRFS - provides error bounds and backward error estimates for the
7 solution to a system of linear equations with a triangular packed coef‐
8 ficient matrix
9
11 SUBROUTINE CTPRFS( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, X, LDX,
12 FERR, BERR, WORK, RWORK, INFO )
13
14 CHARACTER DIAG, TRANS, UPLO
15
16 INTEGER INFO, LDB, LDX, N, NRHS
17
18 REAL BERR( * ), FERR( * ), RWORK( * )
19
20 COMPLEX AP( * ), B( LDB, * ), WORK( * ), X( LDX, * )
21
23 CTPRFS provides error bounds and backward error estimates for the solu‐
24 tion to a system of linear equations with a triangular packed coeffi‐
25 cient matrix. The solution matrix X must be computed by CTPTRS or some
26 other means before entering this routine. CTPRFS does not do iterative
27 refinement because doing so cannot improve the backward error.
28
30 UPLO (input) CHARACTER*1
31 = 'U': A is upper triangular;
32 = 'L': A is lower triangular.
33
34 TRANS (input) CHARACTER*1
35 Specifies the form of the system of equations:
36 = 'N': A * X = B (No transpose)
37 = 'T': A**T * X = B (Transpose)
38 = 'C': A**H * X = B (Conjugate transpose)
39
40 DIAG (input) CHARACTER*1
41 = 'N': A is non-unit triangular;
42 = 'U': A is unit triangular.
43
44 N (input) INTEGER
45 The order of the matrix A. N >= 0.
46
47 NRHS (input) INTEGER
48 The number of right hand sides, i.e., the number of columns of
49 the matrices B and X. NRHS >= 0.
50
51 AP (input) COMPLEX array, dimension (N*(N+1)/2)
52 The upper or lower triangular matrix A, packed columnwise in a
53 linear array. The j-th column of A is stored in the array AP
54 as follows: if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for
55 1<=i<=j; if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for
56 j<=i<=n. If DIAG = 'U', the diagonal elements of A are not
57 referenced and are assumed to be 1.
58
59 B (input) COMPLEX array, dimension (LDB,NRHS)
60 The right hand side matrix B.
61
62 LDB (input) INTEGER
63 The leading dimension of the array B. LDB >= max(1,N).
64
65 X (input) COMPLEX array, dimension (LDX,NRHS)
66 The solution matrix X.
67
68 LDX (input) INTEGER
69 The leading dimension of the array X. LDX >= max(1,N).
70
71 FERR (output) REAL array, dimension (NRHS)
72 The estimated forward error bound for each solution vector X(j)
73 (the j-th column of the solution matrix X). If XTRUE is the
74 true solution corresponding to X(j), FERR(j) is an estimated
75 upper bound for the magnitude of the largest element in (X(j) -
76 XTRUE) divided by the magnitude of the largest element in X(j).
77 The estimate is as reliable as the estimate for RCOND, and is
78 almost always a slight overestimate of the true error.
79
80 BERR (output) REAL array, dimension (NRHS)
81 The componentwise relative backward error of each solution vec‐
82 tor X(j) (i.e., the smallest relative change in any element of
83 A or B that makes X(j) an exact solution).
84
85 WORK (workspace) COMPLEX array, dimension (2*N)
86
87 RWORK (workspace) REAL array, dimension (N)
88
89 INFO (output) INTEGER
90 = 0: successful exit
91 < 0: if INFO = -i, the i-th argument had an illegal value
92
93
94
95 LAPACK routine (version 3.2) November 2008 CTPRFS(1)