Uses extra precise iterative refinement to improve the solution to the system of linear equations with a symmetric/Hermitian positive-definite coefficient matrix A and provides error bounds and backward error estimates.
The routine improves the computed solution to a system of linear equations and provides error bounds and backward error estimates for the solution. In addition to a normwise error bound, the code provides a maximum componentwise error bound, if possible. See comments for
err_bnds_compfor details of the error bounds.
The original system of linear equations may have been equilibrated before calling this routine, as described by the parameters
sbelow. In this case, the solution and error bounds returned are for the original unequilibrated system.
- Specifies whether two-dimensional array storage is row major (LAPACK_ROW_MAJOR) or column major (LAPACK_COL_MAJOR).
- Must be'U'or'L'.Indicates whether the upper or lower triangular part ofAis stored:If, the upper triangle ofuplo='U'Ais stored.If, the lower triangle ofuplo='L'Ais stored.
- Must be'N'or'Y'.Specifies the form of equilibration that was done toAbefore calling this routine.If, no equilibration was done.equed='N'If, both row and column equilibration was done, that is,equed='Y'Ahas been replaced by. The right-hand sidediag(s)*A*diag(s)Bhas been changed accordingly.
- The number of linear equations; the order of the matrixA;n≥0.
- The number of right-hand sides; the number of columns of the matricesBandX;nrhs≥0.
- The arraya(size max(1,lda*n)) contains the symmetric/Hermitian matrixAas specified byuplo. Ifuplo='U', the leadingn-by-nupper triangular part ofacontains the upper triangular part of the matrixAand the strictly lower triangular part ofais not referenced. Ifuplo='L', the leadingn-by-nlower triangular part ofacontains the lower triangular part of the matrixAand the strictly upper triangular part ofais not referenced.
- The arrayb(size max(1,ldb*nrhsfor column major layout and max(1,ldb*n) for row major layout) contains the matrixBwhose columns are the right-hand sides for the systems of equations.
- The leading dimension ofa;.lda≥max(1,n)
- The leading dimension ofaf;.ldaf≥max(1,n)
- Array of sizen. The arrayscontains the scale factors forA.If,equed='N'sis not accessed.Ifequed='Y', each element ofsmust be positive.Each element ofsshould be a power of the radix to ensure a reliable solution and error estimates. Scaling by powers of the radix does not cause rounding errors unless the result underflows or overflows. Rounding errors during scaling lead to refining with a matrix that is not equivalent to the input matrix, producing error estimates that may not be reliable.
- The leading dimension of the arrayb;.ldb≥max(1,n) for column major layout andldb≥nrhsfor row major layout
- Array, sizemax(1,.ldx*nrhs) for column major layout and max(1,ldx*n) for row major layoutThe solution matrixXas computed by?potrs
- The leading dimension of the output arrayx;.ldx≥max(1,n) for column major layout andldx≥nrhsfor row major layout
- Number of error bounds to return for each right hand side and each type (normwise or componentwise). Seeerr_bnds_normanderr_bnds_compdescriptions inOutput Argumentssection below.
- Specifies the number of parameters set inparams. If≤0, theparamsarray is never referenced and default values are used.
- Array, sizenparams. Specifies algorithm parameters. If an entry is less than 0.0, that entry will be filled with the default value used for that parameter. Only positions up tonparamsare accessed; defaults are used for higher-numbered parameters. If defaults are acceptable, you can passnparams= 0, which prevents the source code from accessing theparamsargument.: Whether to perform iterative refinement or not. Default: 1.0 (for single precision flavors), 1.0D+0 (for double precision flavors).params
(Other values are reserved for future use.): Maximum number of residual computations allowed for refinement.params
- No refinement is performed and no error bounds are computed.
- Use the double-precision refinement algorithm, possibly with doubled-single computations if the compilation environment does not support double precision.
: Flag determining if the code will attempt to find a solution with a small componentwise relative error in the double-precision algorithm. Positive is true, 0.0 is false. Default: 1.0 (attempt componentwise convergence).params
- Set to 100.0 to permit convergence using approximate factorizations or factorizations other thanLU. If the factorization uses a technique other than Gaussian elimination, the guarantees inerr_bnds_normanderr_bnds_compmay no longer be trustworthy.
- The improved solution matrixX.
- Reciprocal scaled condition number. An estimate of the reciprocal Skeel condition number of the matrixAafter equilibration (if done). Ifrcondis less than the machine precision, in particular, ifrcond= 0, the matrix is singular to working precision. Note that the error may still be small even if this number is very small and the matrix appears ill-conditioned.
- Array, size at leastmax(1,. Contains the componentwise relative backward error for each solution vectornrhs), that is, the smallest relative change in any element ofxjAorBthat makesan exact solution.xj
- Array of size. For each right-hand side, contains information about various error bounds and condition numbers corresponding to the normwise relative errornrhs*n_err_bnds, which is defined as follows:Normwise relative error in thei-th solution vectorThe array is indexed by the type of error information as described below. There are currently up to three pieces of information returned.
The information for right-hand sidei, where 1≤i≤nrhs, and type of errorerris stored in:
- "Trust/don't trust" boolean. Trust the answer if the reciprocal condition number is less than the thresholdfor single precision flavors andsqrt(n)*slamch(ε)for double precision flavors.sqrt(n)*dlamch(ε)
- "Guaranteed" error bound. The estimated forward error, almost certainly within a factor of 10 of the true error so long as the next entry is greater than the thresholdfor single precision flavors andsqrt(n)*slamch(ε)for double precision flavors. This error bound should only be trusted if the previous boolean is true.sqrt(n)*dlamch(ε)
- Reciprocal condition number. Estimated normwise reciprocal condition number. Compared with the thresholdfor single precision flavors andsqrt(n)*slamch(ε)for double precision flavors to determine if the error estimate is "guaranteed". These reciprocal condition numbers for some appropriately scaled matrixsqrt(n)*dlamch(ε)ZareLetz=s*a, wheresscales each row by a power of the radix so all absolute row sums ofzare approximately 1.
- Column major layout:.err_bnds_norm[(err- 1)*nrhs+i- 1]
- Row major layout:err_bnds_norm[err- 1 + (i- 1)*n_err_bnds]