hesvxx(3)
💖 NAME 💖
okay bestie, welcome to hesvxx(3) — the manual page for the whole {he,sy}svxx crew. The NAME line is:
hesvxx—{he,sy}svxx: rook (v1, expert)
iconic. This is the one that covers the {he,sy}svxx family, and we are keeping every single detail exactly where it belongs.
✨ SYNOPSIS ✨
🫶 Functions 🫶
here's the function lineup, exactly as written, no cap:
subroutine chesvxx (fact, uplo, n, nrhs, a, lda, af, ldaf, ipiv, equed,
s, b, ldb, x, ldx, rcond, rpvgrw, berr, n_err_bnds, err_bnds_norm,
err_bnds_comp, nparams, params, work, rwork, info)
CHESVXX computes the solution to system of linear equations A * X =
B for HE matrices
subroutine csysvxx (fact, uplo, n, nrhs, a, lda, af, ldaf, ipiv, equed,
s, b, ldb, x, ldx, rcond, rpvgrw, berr, n_err_bnds, err_bnds_norm,
err_bnds_comp, nparams, params, work, rwork, info)
CSYSVXX computes the solution to system of linear equations A * X =
B for SY matrices
subroutine dsysvxx (fact, uplo, n, nrhs, a, lda, af, ldaf, ipiv, equed,
s, b, ldb, x, ldx, rcond, rpvgrw, berr, n_err_bnds, err_bnds_norm,
err_bnds_comp, nparams, params, work, iwork, info)
DSYSVXX
subroutine ssysvxx (fact, uplo, n, nrhs, a, lda, af, ldaf, ipiv, equed,
s, b, ldb, x, ldx, rcond, rpvgrw, berr, n_err_bnds, err_bnds_norm,
err_bnds_comp, nparams, params, work, iwork, info)
SSYSVXX
subroutine zhesvxx (fact, uplo, n, nrhs, a, lda, af, ldaf, ipiv, equed,
s, b, ldb, x, ldx, rcond, rpvgrw, berr, n_err_bnds, err_bnds_norm,
err_bnds_comp, nparams, params, work, rwork, info)
ZHESVXX computes the solution to system of linear equations A * X =
B for HE matrices
subroutine zsysvxx (fact, uplo, n, nrhs, a, lda, af, ldaf, ipiv, equed,
s, b, ldb, x, ldx, rcond, rpvgrw, berr, n_err_bnds, err_bnds_norm,
err_bnds_comp, nparams, params, work, rwork, info)
ZSYSVXX computes the solution to system of linear equations A * X =
B for SY matrices
and yes, DSYSVXX and SSYSVXX are literally captioned with just their all-caps names in the original — keeping it exactly like that, bestie 💅.
🔥 Detailed Description 🔥
okay so this section is literally just the heading here — no extra paragraph, no side quest. Then we go straight into Function Documentation.
👑 Function Documentation 👑
🎀 subroutine chesvxx 🎀
subroutine chesvxx (character fact, character uplo, integer n, integer nrhs,
complex, dimension( lda, * ) a, integer lda, complex, dimension( ldaf, *
) af, integer ldaf, integer, dimension( * ) ipiv, character equed, real,
dimension( * ) s, complex, dimension( ldb, * ) b, integer ldb, complex,
dimension( ldx, * ) x, integer ldx, real rcond, real rpvgrw, real,
dimension( * ) berr, integer n_err_bnds, real, dimension( nrhs, * )
err_bnds_norm, real, dimension( nrhs, * ) err_bnds_comp, integer
nparams, real, dimension( * ) params, complex, dimension( * ) work,
real, dimension( * ) rwork, integer info)
CHESVXX computes the solution to system of linear equations A * X = B for HE matrices.
🎯 Purpose 🎯
okay so CHESVXX uses the diagonal pivoting factorization to compute the solution to a complex system of linear equations A * X = B, where A is an N-by-N Hermitian matrix and X and B are N-by-NRHS matrices.
If requested, both normwise and maximum componentwise error bounds are returned. CHESVXX will return a solution with a tiny guaranteed error (O(eps) where eps is the working machine precision) unless the matrix is very ill-conditioned, in which case a warning is returned. Relevant condition numbers also are calculated and returned.
CHESVXX accepts user-provided factorizations and equilibration factors; see the definitions of the FACT and EQUED options. Solving with refinement and using a factorization from a previous CHESVXX call will also produce a solution with either O(eps) errors or warnings, but we cannot make that claim for general user-provided factorizations and equilibration factors if they differ from what CHESVXX would itself produce.
📝 Description 📝
The following steps are performed:
- If
FACT = 'E', real scaling factors are computed to equilibrate the system:
diag(S)*A*diag(S) *inv(diag(S))*X = diag(S)*B
Whether or not the system will be equilibrated depends on the scaling of the matrix A, but if equilibration is used, A is overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
- If
FACT = 'N'or'E', the LU decomposition is used to factor the matrix A (after equilibration ifFACT = 'E') as
A = U * D * U**T, if UPLO = 'U', or
A = L * D * L**T, if UPLO = 'L',
where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is Hermitian and block diagonal with 1-by-1 and 2-by-2 diagonal blocks.
- If some
D(i,i)=0, so that D is exactly singular, then the routine returns withINFO = i. Otherwise, the factored form of A is used to estimate the condition number of the matrix A (see argumentRCOND). If the reciprocal of the condition number is less than machine precision, the routine still goes on to solve for X and compute error bounds as described below. - The system of equations is solved for X using the factored form of A.
- By default (unless
PARAMS(LA_LINRX_ITREF_I)is set to zero), the routine will use iterative refinement to try to get a small error and error bounds. Refinement calculates the residual to at least twice the working precision. - If equilibration was used, the matrix X is premultiplied by
diag(R)so that it solves the original system before equilibration.
Some optional parameters are bundled in the PARAMS array. These settings determine how refinement is performed, but often the defaults are acceptable. If the defaults are acceptable, users can pass NPARAMS = 0 which prevents the source code from accessing the PARAMS argument.
💅 Parameters 💅
FACT
FACT is CHARACTER*1. It specifies whether or not the factored form of the matrix A is supplied on entry, and if not, whether the matrix A should be equilibrated before it is factored.
= 'F'— On entry,AFandIPIVcontain the factored form of A. IfEQUEDis not'N', the matrix A has been equilibrated with scaling factors given byS.A,AF, andIPIVare not modified.= 'N'— The matrix A will be copied toAFand factored.= 'E'— The matrix A will be equilibrated if necessary, then copied toAFand factored.
UPLO
UPLO is CHARACTER*1.
= 'U'— Upper triangle of A is stored;= 'L'— Lower triangle of A is stored.
N
N is INTEGER. The number of linear equations, i.e., the order of the matrix A. N >= 0.
NRHS
NRHS is INTEGER. The number of right hand sides, i.e., the number of columns of the matrices B and X. NRHS >= 0.
A
A is COMPLEX array, dimension (LDA,N). The Hermitian matrix A. If UPLO = 'U', the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If UPLO = 'L', the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced.
On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by diag(S)*A*diag(S).
LDA
LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,N).
AF
AF is COMPLEX array, dimension (LDAF,N). If FACT = 'F', then AF is an input argument and on entry contains the block diagonal matrix D and the multipliers used to obtain the factor U or L from the factorization A = U*D*U**H or A = L*D*L**H as computed by CHETRF.
If FACT = 'N', then AF is an output argument and on exit returns the block diagonal matrix D and the multipliers used to obtain the factor U or L from the factorization A = U*D*U**H or A = L*D*L**H.
LDAF
LDAF is INTEGER. The leading dimension of the array AF. LDAF >= max(1,N).
IPIV
IPIV is INTEGER array, dimension (N).
If FACT = 'F', then IPIV is an input argument and on entry contains details of the interchanges and the block structure of D, as determined by CHETRF. If IPIV(k) > 0, then rows and columns k and IPIV(k) were interchanged and D(k,k) is a 1-by-1 diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
If FACT = 'N', then IPIV is an output argument and on exit contains details of the interchanges and the block structure of D, as determined by CHETRF.
EQUED
EQUED is CHARACTER*1. It specifies the form of equilibration that was done.
= 'N'— No equilibration (always true ifFACT = 'N').= 'Y'— Both row and column equilibration, i.e., A has been replaced bydiag(S) * A * diag(S).
EQUED is an input argument if FACT = 'F'; otherwise, it is an output argument.
S
S— this one's aREALarray, dimension(N), and it's holding the scale factors for A. IfEQUED = 'Y', A gets multiplied on the left and the right bydiag(S). Now here's the vibe switch, bestie:Sis an input argument ifFACT = 'F', otherwiseSis an output argument. And ifFACT = 'F'andEQUED = 'Y', every single element ofShas to be positive. IfSis output, each element ofSis a power of the radix. IfSis input, each element ofSshould be a power of the radix so you get a reliable solution and reliable error estimates — scaling by powers of the radix doesn't cause rounding errors unless the result underflows or overflows. And if rounding errors do sneak in during scaling? You end up refining with a matrix that isn't equivalent to the input matrix, which produces error estimates that may not be reliable. 😭 Lowkey cursed, but okay.B—COMPLEXarray, dimension(LDB,NRHS). On entry, it's theN-by-NRHSright hand side matrixB. On exit though? Depends: ifEQUED = 'N',Bis not modified (untouched, unbothered, living its life ✨); ifEQUED = 'Y',Bis overwritten bydiag(S)*B.LDB—INTEGER. The leading dimension of the arrayB. Must satisfyLDB >= max(1,N). No notes, just rules. 💅X—COMPLEXarray, dimension(LDX,NRHS). IfINFO = 0, this is theN-by-NRHSsolution matrixXto the original system of equations. Big heads up though:AandBare modified on exit ifEQUED .ne. 'N', and the solution to the equilibrated system isinv(diag(S))*X. Ship it 🫶LDX—INTEGER. The leading dimension of the arrayX.LDX >= max(1,N). Same energy asLDB, different letter.RCOND—REAL. Reciprocal scaled condition number — an estimate of the reciprocal Skeel condition number of the matrixAafter equilibration (if equilibration happened at all). If this is less than the machine precision (in particular, if it's zero), the matrix is singular to working precision. But — plot twist — the error may still be small even if this number is very small and the matrix appears ill-conditioned. So don't spiral. 🌸RPVGRW—REAL. Reciprocal pivot growth. On exit, this holds the reciprocal pivot growth factornorm(A)/norm(U). The norm is used — yes, the source literally just says "The norm is used", no further gossip available 💀. If this is much less than 1, then the stability of the LU factorization of the (equilibrated) matrixAcould be poor. That also means the solutionX, the estimated condition numbers, and the error bounds could all be unreliable. And if factorization fails with0<INFO<=N, then this contains the reciprocal pivot growth factor for the leadingINFOcolumns ofA.BERR—REALarray, dimension(NRHS). Componentwise relative backward error — specifically the componentwise relative backward error of each solution vectorX(j)(i.e., the smallest relative change in any element ofAorBthat makesX(j)an exact solution). Tiny number, huge meaning. 🎀N_ERR_BNDS—INTEGER. The number of error bounds to return for each right hand side and each type (normwise or componentwise). SeeERR_BNDS_NORMandERR_BNDS_COMPbelow, bestie, they're right there 👇ERR_BNDS_NORM—REALarray, dimension(NRHS, N_ERR_BNDS). For each right-hand side, this array contains info about various error bounds and condition numbers corresponding to the normwise relative error, which is defined like this:
max_j (abs(XTRUE(j,i) - X(j,i)))
------------------------------
max_j abs(X(j,i))
The array is indexed by the type of error information as described below. There currently are up to three pieces of information returned.
The first index in ERR_BNDS_NORM(i,:) corresponds to the *i*th right-hand side.
The second index in ERR_BNDS_NORM(:,err) contains these three fields:
err = 1— boolean. Trust the answer if the reciprocal condition number is less than the thresholdsqrt(n) * slamch('Epsilon').err = 2— error bound: the estimated forward error, almost certainly within a factor of10of the true error, so long as the next entry is greater than the thresholdsqrt(n) * slamch('Epsilon'). This error bound should only be trusted if the previous boolean is true.err = 3— Reciprocal condition number: estimated normwise reciprocal condition number. Compared with the thresholdsqrt(n) * slamch('Epsilon')to determine if the error estimate is [the original page cuts off mid-sentence here 🙈]. These reciprocal condition numbers are1 / (norm(Z^{-1},inf) * norm(Z,inf))for some appropriately scaled matrixZ. LetZ = S*A, whereSscales each row by a power of the radix so all absolute row sums ofZare approximately1.
See Lapack Working Note 165 for further details and extra cautions. 📚
ERR_BNDS_COMP—REALarray, dimension(NRHS, N_ERR_BNDS). For each right-hand side, this array contains info about various error bounds and condition numbers corresponding to the componentwise relative error, defined as:
abs(XTRUE(j,i) - X(j,i))
max_j ----------------------
abs(X(j,i))
The array is indexed by the right-hand side i (the componentwise relative error depends on it, periodt) and the type of error information described below. There currently are up to three pieces of information returned for each right-hand side. If componentwise accuracy is not requested (PARAMS(3) = 0.0), then ERR_BNDS_COMP is not accessed. And if N_ERR_BNDS < 3, then at most the first (:,N_ERR_BNDS) entries are returned.
The first index in ERR_BNDS_COMP(i,:) corresponds to the *i*th right-hand side.
The second index in ERR_BNDS_COMP(:,err) contains these three fields:
err = 1— boolean. Trust the answer if the reciprocal condition number is less than the thresholdsqrt(n) * slamch('Epsilon').err = 2— error bound: the estimated forward error, almost certainly within a factor of10of the true error, so long as the next entry is greater than the thresholdsqrt(n) * slamch('Epsilon'). This error bound should only be trusted if the previous boolean is true.err = 3— Reciprocal condition number: estimated componentwise reciprocal condition number. Compared with the thresholdsqrt(n) * slamch('Epsilon')to determine if the error estimate is [again, cut off in the source, not me 🙈]. These reciprocal condition numbers are1 / (norm(Z^{-1},inf) * norm(Z,inf))for some appropriately scaled matrixZ. LetZ = S*(A*diag(x)), wherexis the solution for the current right-hand side andSscales each row ofA*diag(x)by a power of the radix so all absolute row sums ofZare approximately1.
See Lapack Working Note 165 for further details and extra cautions. 📚 (yes, same note, it's a whole thing)
NPARAMS—INTEGER. Specifies the number of parameters set inPARAMS. If<= 0, thePARAMSarray is never referenced and default values are used. Ignore it and it simply won't perceive you ✨PARAMS—REALarray, dimensionNPARAMS. Specifies algorithm parameters. If an entry is< 0.0, then that entry gets filled with the default value used for that parameter. Only positions up toNPARAMSare accessed; defaults are used for higher-numbered parameters. Here's the lineup:PARAMS(LA_LINRX_ITREF_I = 1)— whether to perform iterative refinement or not. Default:1.0.= 0.0— no refinement is performed, and no error bounds are computed.= 1.0— use the double-precision refinement algorithm, possibly with doubled-single computations if the compilation environment does not supportDOUBLE PRECISION.- (other values are reserved for future use)
PARAMS(LA_LINRX_ITHRESH_I = 2)— maximum number of residual computations allowed for refinement. Default:10. Aggressive: set to100to permit convergence using approximate factorizations or factorizations other than LU. But if the factorization uses a technique other than Gaussian elimination, the guarantees inerr_bnds_normanderr_bnds_compmay no longer be trustworthy. ⚠️PARAMS(LA_LINRX_CWISE_I = 3)— flag determining if the code will attempt to find a solution with small componentwise relative error in the double-precision algorithm. Positive is true,0.0is false. Default:1.0(attempt componentwise convergence).
WORK—COMPLEXarray, dimension(5*N). Just vibes and workspace. 🧚RWORK—REALarray, dimension(2*N). Same, but real.INFO— and the deets onINFOare coming up next, bestie, hang tight 🫶
INFO (the exit-code tea ☕ — literally the vibe check of whether your solve is safe) is an INTEGER, and here's the whole spectrum:
= 0: Successful exit. The solution to every right-hand side is guaranteed. Slay, we love a guaranteed queen.< 0: IfINFO = -i, the i-th argument had an illegal value. Not cute — check your args, bestie.> 0and<= N:U(INFO,INFO)is exactly zero. The factorization has been completed, but the factorUis exactly singular, so the solution and error bounds could not be computed.RCOND = 0is returned. Singular? The math said no. 💀= N+J: The solution corresponding to the Jth right-hand side is not guaranteed. The solutions corresponding to other right-hand sidesKwithK > Jmay not be guaranteed as well, but only the first such right-hand side is reported. If a small componentwise error is not requested (PARAMS(3) = 0.0) then the Jth right-hand side is the first with a normwise error bound that is not guaranteed (the smallestJsuch thatERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0) the Jth right-hand side is the first with either a normwise or componentwise error bound that is not guaranteed (the smallestJsuch that eitherERR_BNDS_NORM(J,1) = 0.0orERR_BNDS_COMP(J,1) = 0.0). See the definition ofERR_BNDS_NORM(:,1)andERR_BNDS_COMP(:,1). To get information about all of the right-hand sides checkERR_BNDS_NORMorERR_BNDS_COMP. iykyk — the first warning gets the spotlight, but the others are still lurking.
Author ✍️
This routine is brought to you by:
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 505 of file chesvxx.f.
csysvxx 🦋
subroutine csysvxx (character fact, character uplo, integer n, integer nrhs,
complex, dimension( lda, * ) a, integer lda, complex, dimension( ldaf, *
) af, integer ldaf, integer, dimension( * ) ipiv, character equed, real,
dimension( * ) s, complex, dimension( ldb, * ) b, integer ldb, complex,
dimension( ldx, * ) x, integer ldx, real rcond, real rpvgrw, real,
dimension( * ) berr, integer n_err_bnds, real, dimension( nrhs, * )
err_bnds_norm, real, dimension( nrhs, * ) err_bnds_comp, integer
nparams, real, dimension( * ) params, complex, dimension( * ) work,
real, dimension( * ) rwork, integer info)
And what does it do? The line says: CSYSVXX computes the solution to system of linear equations A * X = B for SY matrices. SY = symmetric, bestie — not “sister”. 💅
Purpose: ✨
CSYSVXX uses the diagonal pivoting factorization to compute the solution to a complex system of linear equations A * X = B, where A is an N-by-N symmetric matrix and X and B are N-by-NRHS matrices.
If requested, both normwise and maximum componentwise error bounds are returned. CSYSVXX will return a solution with a tiny guaranteed error (O(eps) where eps is the working machine precision) unless the matrix is very ill-conditioned, in which case a warning is returned. Relevant condition numbers also are calculated and returned.
CSYSVXX accepts user-provided factorizations and equilibration factors; see the definitions of the FACT and EQUED options. Solving with refinement and using a factorization from a previous CSYSVXX call will also produce a solution with either O(eps) errors or warnings, but we cannot make that claim for general user-provided factorizations and equilibration factors if they differ from what CSYSVXX would itself produce. Translation: don't blame the routine if you hand it a weird custom factorization, okay? 🫶
Description: 🧚
The following steps are performed:
- If
FACT = 'E', real scaling factors are computed to equilibrate the system:
diag(S)*A*diag(S) *inv(diag(S))*X = diag(S)*B
Whether or not the system will be equilibrated depends on the scaling of the matrix A, but if equilibration is used, A is overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
- If
FACT = 'N'or'E', the LU decomposition is used to factor the matrixA(after equilibration ifFACT = 'E') as
A = U * D * U**T, if UPLO = 'U', or
A = L * D * L**T, if UPLO = 'L',
where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is symmetric and block diagonal with 1-by-1 and 2-by-2 diagonal blocks.
- If some
D(i,i)=0, so thatDis exactly singular, then the routine returns withINFO = i. Otherwise, the factored form ofAis used to estimate the condition number of the matrixA(see argumentRCOND). If the reciprocal of the condition number is less than machine precision, the routine still goes on to solve forXand compute error bounds as described below. - The system of equations is solved for
Xusing the factored form ofA. - By default (unless
PARAMS(LA_LINRX_ITREF_I)is set to zero), the routine will use iterative refinement to try to get a small error and error bounds. Refinement calculates the residual to at least twice the working precision. - If equilibration was used, the matrix
Xis premultiplied bydiag(R)so that it solves the original system before equilibration.
Some optional parameters are bundled in the PARAMS array. These settings determine how refinement is performed, but often the defaults are acceptable. If the defaults are acceptable, users can pass NPARAMS = 0 which prevents the source code from accessing the PARAMS argument.
Parameters: 💅
FACT — is CHARACTER*1. Specifies whether or not the factored form of the matrix A is supplied on entry, and if not, whether the matrix A should be equilibrated before it is factored.
= 'F': On entry,AFandIPIVcontain the factored form ofA. IfEQUEDis not'N', the matrixAhas been equilibrated with scaling factors given byS.A,AF, andIPIVare not modified.= 'N': The matrixAwill be copied toAFand factored.= 'E': The matrixAwill be equilibrated if necessary, then copied toAFand factored.
UPLO — is CHARACTER*1.
= 'U': Upper triangle ofAis stored;= 'L': Lower triangle ofAis stored.
N — is INTEGER. The number of linear equations, i.e., the order of the matrix A. N >= 0.
NRHS — is INTEGER. The number of right hand sides, i.e., the number of columns of the matrices B and X. NRHS >= 0.
A — is COMPLEX array, dimension (LDA,N). The symmetric matrix A. If UPLO = 'U', the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If UPLO = 'L', the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced.
On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by diag(S)*A*diag(S).
LDA — is INTEGER. The leading dimension of the array A. LDA >= max(1,N).
AF — is COMPLEX array, dimension (LDAF,N). If FACT = 'F', then AF is an input argument and on entry contains the block diagonal matrix D and the multipliers used to obtain the factor U or L from the factorization A = U*D*U**T or A = L*D*L**T as computed by CSYTRF.
If FACT = 'N', then AF is an output argument and on exit returns the block diagonal matrix D and the multipliers used to obtain the factor U or L from the factorization A = U*D*U**T or A = L*D*L**T.
LDAF — is INTEGER. The leading dimension of the array AF. LDAF >= max(1,N).
IPIV — is INTEGER array, dimension (N). If FACT = 'F', then IPIV is an input argument and on entry contains details of the interchanges and the block structure of D, as determined by CSYTRF. If IPIV(k) > 0, then rows and columns k and IPIV(k) were interchanged and D(k,k) is a 1-by-1 diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
If FACT = 'N', then IPIV is an output argument and on exit contains details of the interchanges and the block structure of D, as determined by CSYTRF.
EQUED — is CHARACTER*1. Specifies the form of equilibration that was done.
= 'N': No equilibration (always true ifFACT = 'N').= 'Y': Both row and column equilibration, i.e.,Ahas been replaced bydiag(S) * A * diag(S).
EQUED is an input argument if FACT = 'F'; otherwise, it is an output argument.
S —
S
S is a REAL array, dimension (N) — the scale factors for A, bestie 💅
- if
EQUED = 'Y',Agets multiplied on the left and right bydiag(S) Sis an input argument ifFACT = 'F'; otherwise,Sis an output argument- if
FACT = 'F'andEQUED = 'Y', every element ofSmust be positive ✨ - if
Sis output, each element ofSis a power of the radix - if
Sis input, each element ofSshould be a power of the radix to keep your solution and error estimates reliable 👑 - scaling by powers of the radix causes no rounding errors unless the result underflows or overflows, which, iconic behaviour honestly
- rounding errors during scaling mean you're refining with a matrix that isn't equivalent to the input matrix, and that produces error estimates that may not be reliable 😭
B
B is COMPLEX array, dimension (LDB,NRHS) 🌸
On entry: the N-by-NRHS right hand side matrix B. On exit:
- if
EQUED = 'N',Bis not modified - if
EQUED = 'Y',Bis overwritten bydiag(S)*B
LDB
LDB is INTEGER — the leading dimension of the array B. LDB >= max(1,N). no notes, she said what she said 🫶
X
X is COMPLEX array, dimension (LDX,NRHS) ⭐
If INFO = 0, this is the N-by-NRHS solution matrix X to the original system of equations. Real talk though: A and B are modified on exit if EQUED .ne. 'N', and the solution to the equilibrated system is inv(diag(S))*X. iykyk 💜
LDX
LDX is INTEGER — the leading dimension of the array X. LDX >= max(1,N). simple as 🎀
RCOND
RCOND is REAL — reciprocal scaled condition number 🔥
This is an estimate of the reciprocal Skeel condition number of the matrix A after equilibration (if done). If this is less than the machine precision (in particular, if it's zero), the matrix is singular to working precision — red flag, but hear me out: the error may still be small even if this number is very small and the matrix appears ill-conditioned 💀
RPVGRW
RPVGRW is REAL — reciprocal pivot growth 🌱
On exit, this contains the reciprocal pivot growth factor norm(A)/norm(U). The norm is used. (yes the manpage literally says that, we move 😭)
If this is much less than 1, the stability of the LU factorization of the (equilibrated) matrix A could be poor — which also means your solution X, your estimated condition numbers and your error bounds could all be unreliable, which is giving house of cards 🫠
If factorization fails with 0<INFO<=N, then this contains the reciprocal pivot growth factor for the leading INFO columns of A.
BERR
BERR is REAL array, dimension (NRHS) 💖
Componentwise relative backward error. This is the componentwise relative backward error of each solution vector X(j) — i.e., the smallest relative change in any element of A or B that makes X(j) an exact solution. queen behaviour 👑
N_ERR_BNDS
N_ERR_BNDS is INTEGER 🌈
Number of error bounds to return for each right hand side and each type (normwise or componentwise). See ERR_BNDS_NORM and ERR_BNDS_COMP below 👇
ERR_BNDS_NORM
ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS) ✨
For each right-hand side, this array contains info about various error bounds and condition numbers corresponding to the normwise relative error, defined like so:
Normwise relative error in the ith solution vector:
max_j (abs(XTRUE(j,i) - X(j,i)))
------------------------------
max_j abs(X(j,i))
The array is indexed by the type of error information as described below. There currently are up to three pieces of information returned.
The first index in ERR_BNDS_NORM(i,:) corresponds to the *i*th right-hand side 📍
The second index in ERR_BNDS_NORM(:,err) contains the following three fields:
err = 1— boolean. Trust the answer if the reciprocal condition number is less than the thresholdsqrt(n) * slamch('Epsilon').err = 2— error bound: the estimated forward error, almost certainly within a factor of10of the true error so long as the next entry is greater than the thresholdsqrt(n) * slamch('Epsilon'). This error bound should only be trusted if the previous boolean is true 🙈err = 3— Reciprocal condition number: estimated normwise reciprocal condition number. Compared with the thresholdsqrt(n) * slamch('Epsilon')to determine if the error estimate is . (and yeah, the sentence just ends there in the original — the word went missing, we simply vibe with the mystery 💀) These reciprocal condition numbers are1 / (norm(Z^{-1},inf) * norm(Z,inf))for some appropriately scaled matrixZ. LetZ = S*A, whereSscales each row by a power of the radix so all absolute row sums ofZare approximately1.
See Lapack Working Note 165 for further details and extra cautions 📓
ERR_BNDS_COMP
ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS) 🦋
For each right-hand side, this array contains info about various error bounds and condition numbers corresponding to the componentwise relative error, defined as:
Componentwise relative error in the ith solution vector:
abs(XTRUE(j,i) - X(j,i))
max_j ----------------------
abs(X(j,i))
The array is indexed by the right-hand side i (on which the componentwise relative error depends), and the type of error information as described below. There currently are up to three pieces of information returned for each right-hand side.
- If componentwise accuracy is not requested (
PARAMS(3) = 0.0), thenERR_BNDS_COMPis not accessed 🚫 - If
N_ERR_BNDS < 3, then at most the first(:,N_ERR_BNDS)entries are returned
The first index in ERR_BNDS_COMP(i,:) corresponds to the *i*th right-hand side 📍
The second index in ERR_BNDS_COMP(:,err) contains the following three fields:
err = 1— boolean. Trust the answer if the reciprocal condition number is less than the thresholdsqrt(n) * slamch('Epsilon').err = 2— error bound: the estimated forward error, almost certainly within a factor of10of the true error so long as the next entry is greater than the thresholdsqrt(n) * slamch('Epsilon'). This error bound should only be trusted if the previous boolean is true 🙈err = 3— Reciprocal condition number: estimated componentwise reciprocal condition number. Compared with the thresholdsqrt(n) * slamch('Epsilon')to determine if the error estimate is . (same dropped word, same energy 💀) These reciprocal condition numbers are1 / (norm(Z^{-1},inf) * norm(Z,inf))for some appropriately scaled matrixZ. LetZ = S*(A*diag(x)), wherexis the solution for the current right-hand side andSscales each row ofA*diag(x)by a power of the radix so all absolute row sums ofZare approximately1.
See Lapack Working Note 165 for further details and extra cautions 📓
NPARAMS
NPARAMS is INTEGER 🎀
Specifies the number of parameters set in PARAMS. If <= 0, the PARAMS array is never referenced and default values are used. lowkey the easiest way to live ✨
PARAMS
PARAMS is REAL array, dimension NPARAMS 💅
Specifies algorithm parameters. If an entry is < 0.0, then that entry will be filled with the default value used for that parameter. Only positions up to NPARAMS are accessed; defaults are used for higher-numbered parameters.
PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
refinement or not.
Default: 1.0
= 0.0: No refinement is performed, and no error bounds are
computed.
= 1.0: Use the double-precision refinement algorithm,
possibly with doubled-single computations if the
compilation environment does not support DOUBLE
PRECISION.
(other values are reserved for future use)
PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
computations allowed for refinement.
Default: 10
Aggressive: Set to 100 to permit convergence using approximate
factorizations or factorizations other than LU. If
the factorization uses a technique other than
Gaussian elimination, the guarantees in
err_bnds_norm and err_bnds_comp may no longer be
trustworthy.
PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
will attempt to find a solution with small componentwise
relative error in the double-precision algorithm. Positive
is true, 0.0 is false.
Default: 1.0 (attempt componentwise convergence)
⚠️ real one: thatAggressive: 100option is giving main character energy, but if your factorization isn't Gaussian elimination thenerr_bnds_normanderr_bnds_compmay no longer be trustworthy. proceed with awareness, bestie 😭
WORK
WORK is COMPLEX array, dimension (2*N) 🧚
RWORK
RWORK is REAL array, dimension (2*N) 🍓
and next up we've got INFO, who has so much to say about exit codes — stay with me 💜
INFOisINTEGER— the final vibe check, and here’s how to read it, bestie:= 0: Successful exit. The solution to every right-hand side is guaranteed. ✨< 0: IfINFO = -i, thei-th argument had an illegal value 😭> 0and<= N:U(INFO,INFO)is exactly zero. The factorization has been completed, but the factorUis exactly singular, so the solution and error bounds could not be computed.RCOND = 0is returned. 💀= N+J: The solution corresponding to theJth right-hand side is not guaranteed. The solutions corresponding to other right-hand sidesKwithK > Jmay not be guaranteed as well, but only the first such right-hand side is reported. If a small componentwise error is not requested (PARAMS(3) = 0.0) then theJth right-hand side is the first with a normwise error bound that is not guaranteed (the smallestJsuch thatERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0) theJth right-hand side is the first with either a normwise or componentwise error bound that is not guaranteed (the smallestJsuch that eitherERR_BNDS_NORM(J,1) = 0.0orERR_BNDS_COMP(J,1) = 0.0). See the definition ofERR_BNDS_NORM(:,1)andERR_BNDS_COMP(:,1). To get information about all of the right-hand sides checkERR_BNDS_NORMorERR_BNDS_COMP. 👑
Author 🫶
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 505 of file csysvxx.f.
DSYSVXX 💜
subroutine dsysvxx (character fact, character uplo, integer n, integer nrhs,
double precision, dimension( lda, * ) a, integer lda, double precision,
dimension( ldaf, * ) af, integer ldaf, integer, dimension( * ) ipiv,
character equed, double precision, dimension( * ) s, double precision,
dimension( ldb, * ) b, integer ldb, double precision, dimension( ldx, *
) x, integer ldx, double precision rcond, double precision rpvgrw,
double precision, dimension( * ) berr, integer n_err_bnds, double
precision, dimension( nrhs, * ) err_bnds_norm, double precision,
dimension( nrhs, * ) err_bnds_comp, integer nparams, double precision,
dimension( * ) params, double precision, dimension( * ) work, integer,
dimension( * ) iwork, integer info)
Purpose ✨
DSYSVXX uses the diagonal pivoting factorization to compute the solution to a double precision system of linear equations A * X = B, where A is an N-by-N symmetric matrix and X and B are N-by-NRHS matrices.
If requested, both normwise and maximum componentwise error bounds are returned. DSYSVXX will return a solution with a tiny guaranteed error (O(eps) where eps is the working machine precision) unless the matrix is very ill-conditioned, in which case a warning is returned. Relevant condition numbers also are calculated and returned.
DSYSVXX accepts user-provided factorizations and equilibration factors; see the definitions of the FACT and EQUED options. Solving with refinement and using a factorization from a previous DSYSVXX call will also produce a solution with either O(eps) errors or warnings, but we cannot make that claim for general user-provided factorizations and equilibration factors if they differ from what DSYSVXX would itself produce.
Description 🦋
The following steps are performed:
- If
FACT = 'E', double precision scaling factors are computed to equilibrate the system:
diag(S)*A*diag(S) *inv(diag(S))*X = diag(S)*B
Whether or not the system will be equilibrated depends on the scaling of the matrix A, but if equilibration is used, A is overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
- If
FACT = 'N'or'E', the LU decomposition is used to factor the matrixA(after equilibration ifFACT = 'E') as
A = U * D * U**T, if UPLO = 'U', or
A = L * D * L**T, if UPLO = 'L',
where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is symmetric and block diagonal with 1-by-1 and 2-by-2 diagonal blocks.
- If some
D(i,i)=0, so thatDis exactly singular, then the routine returns withINFO = i. Otherwise, the factored form ofAis used to estimate the condition number of the matrixA(see argumentRCOND). If the reciprocal of the condition number is less than machine precision, the routine still goes on to solve forXand compute error bounds as described below. - The system of equations is solved for
Xusing the factored form ofA. - By default (unless
PARAMS(LA_LINRX_ITREF_I)is set to zero), the routine will use iterative refinement to try to get a small error and error bounds. Refinement calculates the residual to at least twice the working precision. - If equilibration was used, the matrix
Xis premultiplied bydiag(R)so that it solves the original system before equilibration.
Some optional parameters are bundled in the PARAMS array. These settings determine how refinement is performed, but often the defaults are acceptable. If the defaults are acceptable, users can pass NPARAMS = 0 which prevents the source code from accessing the PARAMS argument.
Parameters 💅
FACT—CHARACTER*1. Specifies whether or not the factored form of the matrixAis supplied on entry, and if not, whether the matrixAshould be equilibrated before it is factored.= 'F': On entry,AFandIPIVcontain the factored form ofA. IfEQUEDis not'N', the matrixAhas been equilibrated with scaling factors given byS.A,AF, andIPIVare not modified.= 'N': The matrixAwill be copied toAFand factored.= 'E': The matrixAwill be equilibrated if necessary, then copied toAFand factored.
UPLO—CHARACTER*1.= 'U': Upper triangle ofAis stored;= 'L': Lower triangle ofAis stored.
N—INTEGER. The number of linear equations, i.e., the order of the matrixA.N >= 0.NRHS—INTEGER. The number of right hand sides, i.e., the number of columns of the matricesBandX.NRHS >= 0.A—DOUBLE PRECISION array, dimension(LDA,N). The symmetric matrixA. IfUPLO = 'U', the leadingN-by-Nupper triangular part ofAcontains the upper triangular part of the matrixA, and the strictly lower triangular part ofAis not referenced. IfUPLO = 'L', the leadingN-by-Nlower triangular part ofAcontains the lower triangular part of the matrixA, and the strictly upper triangular part ofAis not referenced. On exit, ifFACT = 'E'andEQUED = 'Y',Ais overwritten bydiag(S)*A*diag(S).LDA—INTEGER. The leading dimension of the arrayA.LDA >= max(1,N).AF—DOUBLE PRECISION array, dimension(LDAF,N). IfFACT = 'F', thenAFis an input argument and on entry contains the block diagonal matrixDand the multipliers used to obtain the factorUorLfrom the factorizationA = U*D*U**TorA = L*D*L**Tas computed byDSYTRF. IfFACT = 'N', thenAFis an output argument and on exit returns the block diagonal matrixDand the multipliers used to obtain the factorUorLfrom the factorizationA = U*D*U**TorA = L*D*L**T.LDAF—INTEGER. The leading dimension of the arrayAF.LDAF >= max(1,N).IPIV—INTEGER array, dimension(N). IfFACT = 'F', thenIPIVis an input argument and on entry contains details of the interchanges and the block structure ofD, as determined byDSYTRF. IfIPIV(k) > 0, then rows and columnskandIPIV(k)were interchanged andD(k,k)is a 1-by-1 diagonal block. IfUPLO = 'U'andIPIV(k) = IPIV(k-1) < 0, then rows and columnsk-1and-IPIV(k)were interchanged andD(k-1:k,k-1:k)is a 2-by-2 diagonal block. IfUPLO = 'L'andIPIV(k) = IPIV(k+1) < 0, then rows and columnsk+1and-IPIV(k)were interchanged andD(k:k+1,k:k+1)is a 2-by-2 diagonal block. IfFACT = 'N', thenIPIVis an output argument and on exit contains details of the interchanges and the block structure ofD, as determined byDSYTRF.EQUED—CHARACTER*1. Specifies the form of equilibration that was done.= 'N': No equilibration (always true ifFACT = 'N').= 'Y': Both row and column equilibration, i.e.,Ahas been replaced bydiag(S) * A * diag(S).EQUEDis an input argument ifFACT = 'F'; otherwise, it is an output argument.
S
S — DOUBLE PRECISION array, dimension (N). The scale factors for A, bestie. If EQUED = 'Y', then A gets multiplied on the left and the right by diag(S). Whether S is input or output depends on FACT: it's an input argument if FACT = 'F'; otherwise it's an output argument. If FACT = 'F' and EQUED = 'Y', every element of S has to be positive, no exceptions 💅.
If S is output, each element of S is a power of the radix ✨. If S is input, each element of S should be a power of the radix to make sure you get a reliable solution and reliable error estimates. Scaling by powers of the radix doesn't cause rounding errors unless the result underflows or overflows 🫶.
Careful, babe: rounding errors during scaling lead to refining with a matrix that is not equivalent to the input matrix, which produces error estimates that may not be reliable. 😭
B — DOUBLE PRECISION array, dimension (LDB,NRHS). On entry, this is the N-by-NRHS right hand side matrix B. On exit:
- if
EQUED = 'N',Bis not modified; - if
EQUED = 'Y',Bis overwritten bydiag(S)*B.
LDB — INTEGER. The leading dimension of the array B. Requirement: LDB >= max(1,N). That's it, that's the whole vibe check 🔥
X — DOUBLE PRECISION array, dimension (LDX,NRHS). If INFO = 0, this is the N-by-NRHS solution matrix X to the original system of equations 👑. Heads up though: A and B are modified on exit if EQUED .ne. 'N', and the solution to the equilibrated system is inv(diag(S))*X — so like, don't come for X directly, iykyk 🌸
LDX — INTEGER. The leading dimension of the array X. Requirement: LDX >= max(1,N). Periodt 💅
RCOND — DOUBLE PRECISION. The reciprocal scaled condition number 🦋. This is an estimate of the reciprocal Skeel condition number of the matrix A after equilibration (if equilibration was done). If this is less than the machine precision — and especially if it is zero — then the matrix is singular to working precision 💀.
But ngl, the error may still be small even if this number is very very small and the matrix appears ill-conditioned. So don't panic-spiral just because RCOND is tiny 🙈
RPVGRW — DOUBLE PRECISION. Reciprocal pivot growth 🌱. On exit, this holds the reciprocal pivot growth factor norm(A)/norm(U). (The norm is used — the original doc is a lil shy about which norm here, so we're reporting it exactly as written 😭.)
If this is much less than 1, then the stability of the LU factorization of the (equilibrated) matrix A could be poor 😬. That also means the solution X, the estimated condition numbers, and the error bounds could all be unreliable.
If the factorization fails with 0<INFO<=N, then this contains the reciprocal pivot growth factor for the leading INFO columns of A.
BERR — DOUBLE PRECISION array, dimension (NRHS). Componentwise relative backward error ✨. This is the componentwise relative backward error of each solution vector X(j) — i.e., the smallest relative change in any element of A or B that makes X(j) an exact solution. Iconic little number, honestly 🎀
N_ERR_BNDS — INTEGER. Number of error bounds to return for each right hand side and each type (normwise or componentwise). See ERR_BNDS_NORM and ERR_BNDS_COMP below 👇
ERR_BNDS_NORM — DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS). For each right-hand side, this array contains info about various error bounds and condition numbers corresponding to the normwise relative error, which is defined like this:
Normwise relative error in the ith solution vector:
max_j (abs(XTRUE(j,i) - X(j,i)))
------------------------------
max_j abs(X(j,i))
The array is indexed by the type of error information as described below. There currently are up to three pieces of information returned.
The first index in ERR_BNDS_NORM(i,:) corresponds to the ith right-hand side.
The second index in ERR_BNDS_NORM(:,err) contains the following three fields:
err = 1— boolean. Trust the answer if the reciprocal condition number is less than the thresholdsqrt(n) * dlamch('Epsilon').err = 2— error bound: the estimated forward error, almost certainly within a factor of10of the true error so long as the next entry is greater than the thresholdsqrt(n) * dlamch('Epsilon'). This error bound should only be trusted if the previous boolean is true.err = 3— reciprocal condition number: estimated normwise reciprocal condition number 🧮. Compared with the thresholdsqrt(n) * dlamch('Epsilon')to determine if the error estimate is (the doc trails off right there, ngl 😭). These reciprocal condition numbers are1 / (norm(Z^{-1},inf) * norm(Z,inf))for some appropriately scaled matrixZ. LetZ = S*A, whereSscales each row by a power of the radix so all absolute row sums ofZare approximately1.
See Lapack Working Note 165 for further details and extra cautions 📖 — yes, that's a real homework assignment, go read it bestie 💜
ERR_BNDS_COMP — DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS). For each right-hand side, this array contains info about various error bounds and condition numbers corresponding to the componentwise relative error, defined like this:
Componentwise relative error in the ith solution vector:
abs(XTRUE(j,i) - X(j,i))
max_j ----------------------
abs(X(j,i))
The array is indexed by the right-hand side i (which is what the componentwise relative error depends on), and by the type of error information as described below. There currently are up to three pieces of information returned for each right-hand side 🌈.
If componentwise accuracy is not requested (PARAMS(3) = 0.0), then ERR_BNDS_COMP is not accessed 🙅. If N_ERR_BNDS < 3, then at most the first (:,N_ERR_BNDS) entries are returned.
The first index in ERR_BNDS_COMP(i,:) corresponds to the ith right-hand side.
The second index in ERR_BNDS_COMP(:,err) contains the following three fields:
err = 1— boolean. Trust the answer if the reciprocal condition number is less than the thresholdsqrt(n) * dlamch('Epsilon').err = 2— error bound: the estimated forward error, almost certainly within a factor of10of the true error so long as the next entry is greater than the thresholdsqrt(n) * dlamch('Epsilon'). This error bound should only be trusted if the previous boolean is true.err = 3— reciprocal condition number: estimated componentwise reciprocal condition number 🧮. Compared with the thresholdsqrt(n) * dlamch('Epsilon')to determine if the error estimate is (again, doc just stops mid-sentence, we don't make the rules 😭). These reciprocal condition numbers are1 / (norm(Z^{-1},inf) * norm(Z,inf))for some appropriately scaled matrixZ. LetZ = S*(A*diag(x)), wherexis the solution for the current right-hand side andSscales each row ofA*diag(x)by a power of the radix so all absolute row sums ofZare approximately1.
Same deal: see Lapack Working Note 165 for further details and extra cautions 📖💜
NPARAMS — INTEGER. Specifies the number of parameters set in PARAMS. If <= 0, the PARAMS array is never referenced and default values are used. Easy 🍓
PARAMS — DOUBLE PRECISION array, dimension (NPARAMS). Specifies algorithm parameters. If an entry is < 0.0, then that entry gets filled with the default value used for that parameter ✨. Only positions up to NPARAMS are accessed; defaults are used for higher-numbered parameters.
PARAMS(LA_LINRX_ITREF_I = 1)— whether to perform iterative refinement or not.- Default:
1.0D+0 = 0.0: no refinement is performed, and no error bounds are computed.= 1.0: use the extra-precise refinement algorithm.- (other values are reserved for future use 👀)
- Default:
PARAMS(LA_LINRX_ITHRESH_I = 2)— maximum number of residual computations allowed for refinement.- Default:
10 - Aggressive: set to
100to permit convergence using approximate factorizations or factorizations other than LU.
- Default:
But fr fr, if the factorization uses a technique other than Gaussian elimination, the guarantees inerr_bnds_normanderr_bnds_compmay no longer be trustworthy 💀
PARAMS(LA_LINRX_CWISE_I = 3)— flag determining if the code will attempt to find a solution with small componentwise relative error in the double-precision algorithm. Positive is true,0.0is false.- Default:
1.0(attempt componentwise convergence)
- Default:
WORK — DOUBLE PRECISION array, dimension (4*N). Just vibes and scratch space 🧚
IWORK — INTEGER array, dimension (N). Integer scratch space, matching energy 💫
INFO —
INFOisINTEGER💅 — okay so this is the receipts section, bestie, and you need to read it like your group chat after a dramatic exam:= 0: Successful exit. The solution to every right-hand side is guaranteed. slay. ✨< 0: IfINFO = -i, the i-th argument had an illegal value. oop. 💀> 0 and <= N:U(INFO,INFO)is exactly zero. The factorization has been completed, but the factorUis exactly singular, so the solution and error bounds could not be computed.RCOND = 0is returned. it's giving singular matrix energy. 😭= N+J: The solution corresponding to the Jth right-hand side is not guaranteed. The solutions corresponding to other right-hand sidesKwithK > Jmay not be guaranteed as well, but only the first such right-hand side is reported. If a small componentwise error is not requested (PARAMS(3) = 0.0) then the Jth right-hand side is the first with a normwise error bound that is not guaranteed (the smallestJsuch thatERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0) the Jth right-hand side is the first with either a normwise or componentwise error bound that is not guaranteed (the smallestJsuch that eitherERR_BNDS_NORM(J,1) = 0.0orERR_BNDS_COMP(J,1) = 0.0). See the definition ofERR_BNDS_NORM(:,1)andERR_BNDS_COMP(:,1). To get information about all of the right-hand sides checkERR_BNDS_NORMorERR_BNDS_COMP. literally the fine print but make it fashion. 🎀
👑 Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
📍 Definition
Definition at line 501 of file dsysvxx.f.
subroutine ssysvxx (character fact, character uplo, integer n, integer nrhs,
real, dimension( lda, * ) a, integer lda, real, dimension( ldaf, * ) af,
integer ldaf, integer, dimension( * ) ipiv, character equed, real,
dimension( * ) s, real, dimension( ldb, * ) b, integer ldb, real,
dimension( ldx, * ) x, integer ldx, real rcond, real rpvgrw, real,
dimension( * ) berr, integer n_err_bnds, real, dimension( nrhs, * )
err_bnds_norm, real, dimension( nrhs, * ) err_bnds_comp, integer
nparams, real, dimension( * ) params, real, dimension( * ) work,
integer, dimension( * ) iwork, integer info)
💅 SSYSVXX
✨ Purpose
SSYSVXX uses the diagonal pivoting factorization to compute the solution to a real system of linear equations A * X = B, where A is an N-by-N symmetric matrix and X and B are N-by-NRHS matrices. main character solver behavior, honestly. 🌈
If requested, both normwise and maximum componentwise error bounds are returned. SSYSVXX will return a solution with a tiny guaranteed error (O(eps) where eps is the working machine precision) unless the matrix is very ill-conditioned, in which case a warning is returned. Relevant condition numbers also are calculated and returned. we love a routine that tells you when things are sketchy. 🫶
SSYSVXX accepts user-provided factorizations and equilibration factors; see the definitions of the FACT and EQUED options. Solving with refinement and using a factorization from a previous SSYSVXX call will also produce a solution with either O(eps) errors or warnings, but we cannot make that claim for general user-provided factorizations and equilibration factors if they differ from what SSYSVXX would itself produce. no cap: custom inputs are on you. ⚠️
🧚 Description
The following steps are performed:
- If
FACT = 'E', real scaling factors are computed to equilibrate the system:
diag(S)*A*diag(S) *inv(diag(S))*X = diag(S)*B
Whether or not the system will be equilibrated depends on the scaling of the matrix A, but if equilibration is used, A is overwritten by diag(S)*A*diag(S) and B by diag(S)*B. scaling era. 🧚
- If
FACT = 'N'or'E', the LU decomposition is used to factor the matrixA(after equilibration ifFACT = 'E') as
A = U * D * U**T, if UPLO = 'U', or
A = L * D * L**T, if UPLO = 'L',
where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is symmetric and block diagonal with 1-by-1 and 2-by-2 diagonal blocks. block diagonal? iconic structure, honestly. 💜
- If some
D(i,i)=0, so thatDis exactly singular, then the routine returns withINFO = i. Otherwise, the factored form ofAis used to estimate the condition number of the matrixA(see argumentRCOND). If the reciprocal of the condition number is less than machine precision, the routine still goes on to solve forXand compute error bounds as described below. singular D is a whole situation. 💀 - The system of equations is solved for
Xusing the factored form ofA. solving, periodt. ✨ - By default (unless
PARAMS(LA_LINRX_ITREF_I)is set to zero), the routine will use iterative refinement to try to get a small error and error bounds. Refinement calculates the residual to at least twice the working precision. iterative refinement ate, lowkey. 🔥 - If equilibration was used, the matrix
Xis premultiplied bydiag(R)so that it solves the original system before equilibration. putting it back, bestie. 🎀
Some optional parameters are bundled in the PARAMS array. These settings determine how refinement is performed, but often the defaults are acceptable. If the defaults are acceptable, users can pass NPARAMS = 0 which prevents the source code from accessing the PARAMS argument. defaults are the main character here. 💅
💖 Parameters
FACT—FACTisCHARACTER*1. Specifies whether or not the factored form of the matrixAis supplied on entry, and if not, whether the matrixAshould be equilibrated before it is factored.= 'F': On entry,AFandIPIVcontain the factored form ofA. IfEQUEDis not'N', the matrixAhas been equilibrated with scaling factors given byS.A,AF, andIPIVare not modified. frozen. untouched. we respect it. 🫶= 'N': The matrixAwill be copied toAFand factored. copy + factor combo. ✨= 'E': The matrixAwill be equilibrated if necessary, then copied toAFand factored. equilibrate first, then serve. 💅
UPLO—UPLOisCHARACTER*1.= 'U': Upper triangle ofAis stored; upper triangle supremacy. 🦋= 'L': Lower triangle ofAis stored. lower triangle gang. 💜
N—NisINTEGER. The number of linear equations, i.e., the order of the matrixA.N >= 0. zero is allowed, bestie. 🍓NRHS—NRHSisINTEGER. The number of right hand sides, i.e., the number of columns of the matricesBandX.NRHS >= 0. more RHS, more columns, more vibes. 🌸A—AisREAL array, dimension (LDA,N). The symmetric matrixA. IfUPLO = 'U', the leading N-by-N upper triangular part ofAcontains the upper triangular part of the matrixA, and the strictly lower triangular part ofAis not referenced. IfUPLO = 'L', the leading N-by-N lower triangular part ofAcontains the lower triangular part of the matrixA, and the strictly upper triangular part ofAis not referenced. only one triangle gets read. the other is not invited. 🙈 On exit, ifFACT = 'E'andEQUED = 'Y',Ais overwritten bydiag(S)*A*diag(S). overwritten, so don't act surprised. 😭LDA—LDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,N). respect the leading dimension, fr fr. 🫶AF—AFisREAL array, dimension (LDAF,N). IfFACT = 'F', thenAFis an input argument and on entry contains the block diagonal matrixDand the multipliers used to obtain the factorUorLfrom the factorizationA = U*D*U**TorA = L*D*L**Tas computed bySSYTRF. precomputed factor? we love a shortcut. ✨ IfFACT = 'N', thenAFis an output argument and on exit returns the block diagonal matrixDand the multipliers used to obtain the factorUorLfrom the factorizationA = U*D*U**TorA = L*D*L**T. output mode: AF gets the goods. 🎀LDAF—LDAFisINTEGER. The leading dimension of the arrayAF.LDAF >= max(1,N). another leading dimension check, bestie. 💜IPIV—IPIVisINTEGER array, dimension (N). IfFACT = 'F', thenIPIVis an input argument and on entry contains details of the interchanges and the block structure ofD, as determined bySSYTRF. IfIPIV(k) > 0, then rows and columnskandIPIV(k)were interchanged andD(k,k)is a 1-by-1 diagonal block. IfUPLO = 'U'andIPIV(k) = IPIV(k-1) < 0, then rows and columnsk-1and-IPIV(k)were interchanged andD(k-1:k,k-1:k)is a 2-by-2 diagonal block. IfUPLO = 'L'andIPIV(k) = IPIV(k+1) < 0, then rows and columnsk+1and-IPIV(k)were interchanged andD(k:k+1,k:k+1)is a 2-by-2 diagonal block. pivot lore. read it slowly, it's giving lore. 🔥 IfFACT = 'N', thenIPIVis an output argument and on exit contains details of the interchanges and the block structure ofD, as determined bySSYTRF. same details, but it's output era now. 💅EQUED—EQUEDisCHARACTER*1. Specifies the form of equilibration that was done.= 'N': No equilibration (always true ifFACT = 'N'). no scaling, no drama. 🍓= 'Y': Both row and column equilibration, i.e.,Ahas been replaced bydiag(S) * A * diag(S). row AND column? balanced. iconic. 🌈EQUEDis an input argument ifFACT = 'F'; otherwise, it is an output argument. depends on FACT, bestie. 🎀
S—SisREAL array, dimension (N). The scale factors forA. IfEQUED = 'Y',Ais multiplied on the left and right bydiag(S).Sis an input argument ifFACT = 'F'; otherwise,Sis an output argument. IfFACT = 'F'andEQUED = 'Y', each element ofSmust be positive. IfSis output, each element ofSis a power of the radix. IfSis input, 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. bestie, this is the caution paragraph. read it carefully. ⚠️B—
B — this one's a REAL array, dimension (LDB,NRHS) 🫶 On entry, it's your N-by-NRHS right hand side matrix B. On exit? Depends on the vibe:
- if
EQUED = 'N', B is literally not modified, untouched, left alone 💅 - if
EQUED = 'Y', B gets overwritten bydiag(S)*B(yes, your input becomes a whole different matrix, don't be shook)
LDB — an INTEGER, bestie. It's the leading dimension of the array B, and it better be LDB >= max(1,N). No exceptions, we're not doing that today.
X — a REAL array, dimension (LDX,NRHS) ✨ If INFO = 0, this is the N-by-NRHS solution matrix X to the original system of equations. Big note though: A and B are modified on exit if EQUED .ne. 'N', and the solution to the equilibrated system is inv(diag(S))*X. So like, the X you get back needs that little extra step to actually be the answer, iykyk 🦋
LDX — an INTEGER. Leading dimension of the array X, and it's LDX >= max(1,N). Same energy as LDB, same non-negotiable gatekeeping 👑
RCOND — a REAL, and it's the reciprocal scaled condition number. Specifically it's an estimate of the reciprocal Skeel condition number of the matrix A after equilibration (if that was done). Here's the tea: if this is less than the machine precision (in particular, if it's zero), the matrix is singular to working precision 😭 But — and this is the plot twist — the error may still be small even if this number is very small and the matrix appears ill-conditioned. So don't panic-jump to conclusions.
RPVGRW — a REAL, the reciprocal pivot growth 🧚 On exit, it contains the reciprocal pivot growth factor norm(A)/norm(U). The norm is used. If this is much less than 1, then the stability of the LU factorization of the (equilibrated) matrix A could be poor — it's giving unstable, and not in a fun way. That also means your solution X, your estimated condition numbers, and your error bounds could all be unreliable. And if the factorization fails with 0<INFO<=N, then this contains the reciprocal pivot growth factor for the leading INFO columns of A. Noted. Filed. Remembered. 📌
BERR — a REAL array, dimension (NRHS), holding the componentwise relative backward error. So for each solution vector X(j), this is the componentwise relative backward error of that vector — i.e., the smallest relative change in any element of A or B that makes X(j) an exact solution. Tiny change, exact solution, that's the whole flex 💀
N_ERR_BNDS — an INTEGER. The number of error bounds to return for each right hand side and each type (normwise or componentwise). Check ERR_BNDS_NORM and ERR_BNDS_COMP below, they're the main characters here ⭐
ERR_BNDS_NORM — a REAL array, dimension (NRHS, N_ERR_BNDS) 🌈 For each right-hand side, this array is packed with info about various error bounds and condition numbers for the normwise relative error, which is defined like this:
max_j (abs(XTRUE(j,i) - X(j,i)))
------------------------------
max_j abs(X(j,i))
That's the normwise relative error in the ith solution vector, bestie, right there ^^. The array is indexed by the type of error information as described below. There currently are up to three pieces of information returned.
The first index in ERR_BNDS_NORM(i,:) corresponds to the ith right-hand side 🎀
The second index in ERR_BNDS_NORM(:,err) contains these three fields:
err = 1— boolean. Trust the answer if the reciprocal condition number is less than the thresholdsqrt(n) * slamch('Epsilon').err = 2— 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 thresholdsqrt(n) * slamch('Epsilon'). This error bound should only be trusted if the previous boolean is true. Only then. Don't be trusting it otherwise 🙈err = 3— reciprocal condition number: estimated normwise reciprocal condition number. Compared with the thresholdsqrt(n) * slamch('Epsilon')to determine if the error estimate is . These reciprocal condition numbers are1 / (norm(Z^{-1},inf) * norm(Z,inf))for some appropriately scaled matrix Z. LetZ = S*A, where S scales each row by a power of the radix so all absolute row sums of Z are approximately 1.
And yeah, that sentence really does just trail off into nothing in the source — that's not me being lazy, that's just what we were handed 💀
See Lapack Working Note 165 for further details and extra cautions 📚
ERR_BNDS_COMP — a REAL array, dimension (NRHS, N_ERR_BNDS) 🌸 Same deal for each right-hand side, except this one's all about the error bounds and condition numbers corresponding to the componentwise relative error, defined like so:
abs(XTRUE(j,i) - X(j,i))
max_j ----------------------
abs(X(j,i))
That's the componentwise relative error in the ith solution vector ✨ The array is indexed by the right-hand side i (on which the componentwise relative error depends), and the type of error information as described below. There currently are up to three pieces of information returned for each right-hand side. And here's the important bit: if componentwise accuracy is not requested (PARAMS(3) = 0.0), then ERR_BNDS_COMP is not accessed at all. If N_ERR_BNDS < 3, then at most the first (:,N_ERR_BNDS) entries are returned.
The first index in ERR_BNDS_COMP(i,:) corresponds to the ith right-hand side 💖
The second index in ERR_BNDS_COMP(:,err) contains these three fields:
err = 1— boolean. Trust the answer if the reciprocal condition number is less than the thresholdsqrt(n) * slamch('Epsilon').err = 2— 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 thresholdsqrt(n) * slamch('Epsilon'). This error bound should only be trusted if the previous boolean is true (yes, same rule, it's a package deal 🫶).err = 3— reciprocal condition number: estimated componentwise reciprocal condition number. Compared with the thresholdsqrt(n) * slamch('Epsilon')to determine if the error estimate is . These reciprocal condition numbers are1 / (norm(Z^{-1},inf) * norm(Z,inf))for some appropriately scaled matrix Z. LetZ = S*(A*diag(x)), where x is the solution for the current right-hand side and S scales each row ofA*diag(x)by a power of the radix so all absolute row sums of Z are approximately 1.
Same dangling sentence situation, same source truncation, we move 💀
See Lapack Working Note 165 for further details and extra cautions 📚 (yes, again — it's that serious)
NPARAMS — an INTEGER. Specifies the number of parameters set in PARAMS. If <= 0, the PARAMS array is never referenced and default values are used. Never referenced. Not even glanced at. 👀
PARAMS — a REAL array, dimension NPARAMS, and this is where you get to be a control freak (affectionate) 💅 It specifies algorithm parameters. If an entry is < 0.0, then that entry will be filled with the default value used for that parameter. Only positions up to NPARAMS are accessed; defaults are used for higher-numbered parameters. The lineup:
PARAMS(LA_LINRX_ITREF_I = 1)— whether to perform iterative refinement or not.- Default:
1.0 = 0.0: no refinement is performed, and no error bounds are computed. Straight up no notes.= 1.0: use the double-precision refinement algorithm, possibly with doubled-single computations if the compilation environment does not supportDOUBLE PRECISION.- (other values are reserved for future use — so like, don't invent your own 🎀)
- Default:
PARAMS(LA_LINRX_ITHRESH_I = 2)— maximum number of residual computations allowed for refinement.- Default:
10 - Aggressive: set to
100to permit convergence using approximate factorizations or factorizations other than LU. ⚠️ But if the factorization uses a technique other than Gaussian elimination, the guarantees inerr_bnds_normanderr_bnds_compmay no longer be trustworthy. So, aggressive mode = sketchy mode, choose wisely.
- Default:
PARAMS(LA_LINRX_CWISE_I = 3)— flag determining if the code will attempt to find a solution with small componentwise relative error in the double-precision algorithm. Positive is true,0.0is false.- Default:
1.0(attempt componentwise convergence)
- Default:
WORK — a REAL array, dimension (4*N). That's it, that's the whole description, it's workspace, give it 4*N and let it cook 🍓
IWORK — an INTEGER array, dimension (N). Short, sweet, integer-flavored 💜
INFO — okay so INFO is about to get its own whole moment and we are not rushing it, so hold that thought bestie ✨
INFO— okay bestie, this is theINTEGERexit-status tea ☕ and it's lowkey the vibe check for the whole run 👑= 0: successful exit. The solution to every right-hand side is guaranteed. slay ✨< 0: ifINFO = -i, the i-th argument had an illegal value 🙈> 0and<= N:U(INFO,INFO)is exactly zero. The factorization has been completed, but the factorUis exactly singular, so the solution and error bounds could not be computed.RCOND = 0is returned 💀= N+J: the solution corresponding to the Jth right-hand side is not guaranteed. The solutions corresponding to other right-hand sidesKwithK > Jmay not be guaranteed as well, but only the first such right-hand side is reported. If a small componentwise error is not requested (PARAMS(3) = 0.0) then the Jth right-hand side is the first with a normwise error bound that is not guaranteed (the smallestJsuch thatERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0) the Jth right-hand side is the first with either a normwise or componentwise error bound that is not guaranteed (the smallestJsuch that eitherERR_BNDS_NORM(J,1) = 0.0orERR_BNDS_COMP(J,1) = 0.0). See the definition ofERR_BNDS_NORM(:,1)andERR_BNDS_COMP(:,1). To get information about all of the right-hand sides checkERR_BNDS_NORMorERR_BNDS_COMP. 🫶
🎀 Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 504 of file ssysvxx.f.
🦋 subroutine zhesvxx
subroutine zhesvxx (character fact, character uplo, integer n, integer nrhs,
complex*16, dimension( lda, * ) a, integer lda, complex*16, dimension(
ldaf, * ) af, integer ldaf, integer, dimension( * ) ipiv, character
equed, double precision, dimension( * ) s, complex*16, dimension( ldb, *
) b, integer ldb, complex*16, dimension( ldx, * ) x, integer ldx, double
precision rcond, double precision rpvgrw, double precision, dimension( *
) berr, integer n_err_bnds, double precision, dimension( nrhs, * )
err_bnds_norm, double precision, dimension( nrhs, * ) err_bnds_comp,
integer nparams, double precision, dimension( * ) params, complex*16,
dimension( * ) work, double precision, dimension( * ) rwork, integer
info)
ZHESVXX computes the solution to system of linear equations A * X = B for HE matrices 💅 periodt.
✨ Purpose
ZHESVXX uses the diagonal pivoting factorization to compute the solution to a complex*16 system of linear equations A * X = B, where A is an N-by-N Hermitian matrix and X and B are N-by-NRHS matrices. 🦋
If requested, both normwise and maximum componentwise error bounds are returned. ZHESVXX will return a solution with a tiny guaranteed error (O(eps) where eps is the working machine precision) unless the matrix is very ill-conditioned, in which case a warning is returned. Relevant condition numbers also are calculated and returned. 🔥
ZHESVXX accepts user-provided factorizations and equilibration factors; see the definitions of the FACT and EQUED options. Solving with refinement and using a factorization from a previous ZHESVXX call will also produce a solution with either O(eps) errors or warnings, but we cannot make that claim for general user-provided factorizations and equilibration factors if they differ from what ZHESVXX would itself produce. 🫶
🌸 Description
The following steps are performed:
- If
FACT = 'E', double precision scaling factors are computed to equilibrate the system:
diag(S)*A*diag(S) *inv(diag(S))*X = diag(S)*B
Whether or not the system will be equilibrated depends on the scaling of the matrix A, but if equilibration is used, A is overwritten by diag(S)*A*diag(S) and B by diag(S)*B. ✨
- If
FACT = 'N'or'E', the LU decomposition is used to factor the matrixA(after equilibration ifFACT = 'E') as
A = U * D * U**T, if UPLO = 'U', or
A = L * D * L**T, if UPLO = 'L',
where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is Hermitian and block diagonal with 1-by-1 and 2-by-2 diagonal blocks. 💜
- If some
D(i,i)=0, so thatDis exactly singular, then the routine returns withINFO = i. Otherwise, the factored form ofAis used to estimate the condition number of the matrixA(see argumentRCOND). If the reciprocal of the condition number is less than machine precision, the routine still goes on to solve forXand compute error bounds as described below. 🔥 - The system of equations is solved for
Xusing the factored form ofA. 🎀 - By default (unless
PARAMS(LA_LINRX_ITREF_I)is set to zero), the routine will use iterative refinement to try to get a small error and error bounds. Refinement calculates the residual to at least twice the working precision. 🌟 - If equilibration was used, the matrix
Xis premultiplied bydiag(R)so that it solves the original system before equilibration. 🦋
Some optional parameters are bundled in the PARAMS array. These settings determine how refinement is performed, but often the defaults are acceptable. If the defaults are acceptable, users can pass NPARAMS = 0 which prevents the source code from accessing the PARAMS argument. 🎀
🎀 Parameters
FACT—FACT is CHARACTER*1. Specifies whether or not the factored form of the matrixAis supplied on entry, and if not, whether the matrixAshould be equilibrated before it is factored.= 'F': On entry,AFandIPIVcontain the factored form ofA. IfEQUEDis not'N', the matrixAhas been equilibrated with scaling factors given byS.A,AF, andIPIVare not modified.= 'N': The matrixAwill be copied toAFand factored.= 'E': The matrixAwill be equilibrated if necessary, then copied toAFand factored.
UPLO—UPLO is CHARACTER*1.= 'U': Upper triangle ofAis stored;= 'L': Lower triangle ofAis stored.
N—N is INTEGER. The number of linear equations, i.e., the order of the matrixA.N >= 0.NRHS—NRHS is INTEGER. The number of right hand sides, i.e., the number of columns of the matricesBandX.NRHS >= 0.A—A is COMPLEX*16 array, dimension (LDA,N). The Hermitian matrixA. IfUPLO = 'U', the leading N-by-N upper triangular part ofAcontains the upper triangular part of the matrixA, and the strictly lower triangular part ofAis not referenced. IfUPLO = 'L', the leading N-by-N lower triangular part ofAcontains the lower triangular part of the matrixA, and the strictly upper triangular part ofAis not referenced.
On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by diag(S)*A*diag(S).
LDA—LDA is INTEGER. The leading dimension of the arrayA.LDA >= max(1,N).AF—AF is COMPLEX*16 array, dimension (LDAF,N). IfFACT = 'F', thenAFis an input argument and on entry contains the block diagonal matrixDand the multipliers used to obtain the factorUorLfrom the factorizationA = U*D*U**HorA = L*D*L**Has computed byZHETRF.
If FACT = 'N', then AF is an output argument and on exit returns the block diagonal matrix D and the multipliers used to obtain the factor U or L from the factorization A = U*D*U**H or A = L*D*L**H.
LDAF—LDAF is INTEGER. The leading dimension of the arrayAF.LDAF >= max(1,N).IPIV—IPIV is INTEGER array, dimension (N). IfFACT = 'F', thenIPIVis an input argument and on entry contains details of the interchanges and the block structure ofD, as determined byZHETRF. IfIPIV(k) > 0, then rows and columnskandIPIV(k)were interchanged andD(k,k)is a 1-by-1 diagonal block. IfUPLO = 'U'andIPIV(k) = IPIV(k-1) < 0, then rows and columnsk-1and-IPIV(k)were interchanged andD(k-1:k,k-1:k)is a 2-by-2 diagonal block. IfUPLO = 'L'andIPIV(k) = IPIV(k+1) < 0, then rows and columnsk+1and-IPIV(k)were interchanged andD(k:k+1,k:k+1)is a 2-by-2 diagonal block.
If FACT = 'N', then IPIV is an output argument and on exit contains details of the interchanges and the block structure of D, as determined by ZHETRF.
EQUED—EQUED is CHARACTER*1. Specifies the form of equilibration that was done.= 'N': No equilibration (always true ifFACT = 'N').= 'Y': Both row and column equilibration, i.e.,Ahas been replaced bydiag(S) * A * diag(S).
EQUED is an input argument if FACT = 'F'; otherwise, it is an output argument.
SS— S is aDOUBLE PRECISIONarray, dimension(N). These are the scale factors for A, bestie ✨ IfEQUED = 'Y', A gets multiplied on the left and the right bydiag(S). S is an input argument whenFACT = 'F'— otherwise it's an output argument. And ifFACT = 'F'withEQUED = 'Y', every single element of S has to be positive, no exceptions 🫶 If S is output, each element is a power of the radix. If S is input, each element should be a power of the radix so you get a reliable solution and reliable error estimates — scaling by powers of the radix doesn't cause rounding errors unless the result underflows or overflows. Lowkey important: rounding errors during scaling mean you're refining with a matrix that is not equivalent to the input matrix, and that produces error estimates that may not be reliable 😭B— B is aCOMPLEX*16array, dimension(LDB,NRHS). On entry it's the N-by-NRHS right hand side matrix B. On exit? Depends on the vibe check:- if
EQUED = 'N', B is not modified; - if
EQUED = 'Y', B gets overwritten bydiag(S)*B💅
- if
LDB— LDB isINTEGER. It's the leading dimension of the array B, and it must satisfyLDB >= max(1,N)— the way that math is just mathing 🎀X— X is aCOMPLEX*16array, dimension(LDX,NRHS). IfINFO = 0, this is the N-by-NRHS solution matrix X to the original system of equations. That "original" part matters, so heads up: A and B are both modified on exit ifEQUED .ne. 'N', and the solution to the equilibrated system isinv(diag(S))*X👑LDX— LDX isINTEGER, the leading dimension of the array X. Gotta satisfyLDX >= max(1,N). Same energy as LDB, different letter 🦋RCOND— RCOND isDOUBLE PRECISION. This is the reciprocal scaled condition number — an estimate of the reciprocal Skeel condition number of matrix A after equilibration (if any was done). If it comes back less than the machine precision (and especially if it's zero), the matrix is singular to working precision ⚠️ But — and this is the plot twist — the error may still be small even when this number is very small and the matrix looks ill-conditioned, so don't panic-spiral just yet 🙈RPVGRW— RPVGRW isDOUBLE PRECISION, the reciprocal pivot growth. On exit it holds the reciprocal pivot growth factornorm(A)/norm(U). The norm is used. If this is much less than 1, then the stability of the LU factorization of the (equilibrated) matrix A could be poor 💀 Which also means the solution X, the estimated condition numbers, and the error bounds could all be unreliable. And if the factorization fails with0<INFO<=N, then this contains the reciprocal pivot growth factor for the leadingINFOcolumns of A. Rude, but informative.BERR— BERR is aDOUBLE PRECISIONarray, dimension(NRHS). It's the componentwise relative backward error of each solution vectorX(j)— i.e., the smallest relative change in any element of A or B that makesX(j)an exact solution. Cute little minimum, extremely serious 🍓N_ERR_BNDS— N_ERR_BNDS isINTEGER, the number of error bounds to return for each right hand side and each type (normwise or componentwise). PeepERR_BNDS_NORMandERR_BNDS_COMPbelow 👇ERR_BNDS_NORM— ERR_BNDS_NORM is aDOUBLE PRECISIONarray, dimension(NRHS, N_ERR_BNDS). For each right-hand side it holds info about various error bounds and condition numbers tied to the normwise relative error, defined like this:
Normwise relative error in the ith solution vector:
max_j (abs(XTRUE(j,i) - X(j,i)))
------------------------------
max_j abs(X(j,i))
The array is indexed by the type of error information as described below. There are currently up to three pieces of information returned. The first index in ERR_BNDS_NORM(i,:) corresponds to the *i*th right-hand side. The second index in ERR_BNDS_NORM(:,err) contains these three fields:
err = 1— boolean. Trust the answer if the reciprocal condition number is less than the thresholdsqrt(n) * dlamch('Epsilon').err = 2— 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 thresholdsqrt(n) * dlamch('Epsilon'). This error bound should only be trusted if the previous boolean is true 🫡err = 3— Reciprocal condition number: estimated normwise reciprocal condition number. Compared with the thresholdsqrt(n) * dlamch('Epsilon')to determine if the error estimate is. These reciprocal condition numbers are1 / (norm(Z^{-1},inf) * norm(Z,inf))for some appropriately scaled matrix Z. LetZ = S*A, where S scales each row by a power of the radix so all absolute row sums of Z are approximately 1 ✨
See Lapack Working Note 165 for further details and extra cautions — genuinely, go read it, iykyk 📖
ERR_BNDS_COMP— ERR_BNDS_COMP is aDOUBLE PRECISIONarray, dimension(NRHS, N_ERR_BNDS). Same deal, but for the componentwise relative error, defined as:
Componentwise relative error in the ith solution vector:
abs(XTRUE(j,i) - X(j,i))
max_j ----------------------
abs(X(j,i))
The array is indexed by the right-hand side i (because the componentwise relative error depends on it) and by the type of error information described below. There are currently up to three pieces of information returned per right-hand side. If componentwise accuracy is not requested (PARAMS(3) = 0.0), then ERR_BNDS_COMP is not accessed. And if N_ERR_BNDS < 3, then at most the first (:,N_ERR_BNDS) entries are returned. The first index in ERR_BNDS_COMP(i,:) corresponds to the *i*th right-hand side. The second index in ERR_BNDS_COMP(:,err) contains:
err = 1— boolean. Trust the answer if the reciprocal condition number is less than the thresholdsqrt(n) * dlamch('Epsilon').err = 2— 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 thresholdsqrt(n) * dlamch('Epsilon'). This error bound should only be trusted if the previous boolean is true 💅err = 3— Reciprocal condition number: estimated componentwise reciprocal condition number. Compared with the thresholdsqrt(n) * dlamch('Epsilon')to determine if the error estimate is. These reciprocal condition numbers are1 / (norm(Z^{-1},inf) * norm(Z,inf))for some appropriately scaled matrix Z. LetZ = S*(A*diag(x)), where x is the solution for the current right-hand side and S scales each row ofA*diag(x)by a power of the radix so all absolute row sums of Z are approximately 1 🌈
Again: see Lapack Working Note 165 for further details and extra cautions. Not optional reading, bestie 🧚
NPARAMS— NPARAMS isINTEGER. It specifies the number of parameters set inPARAMS. If<= 0, thePARAMSarray is never referenced and default values are used. Ghosted. Not even looked at 👻PARAMS— PARAMS is aDOUBLE PRECISIONarray, dimensionNPARAMS. It specifies algorithm parameters. If an entry is< 0.0, that entry gets filled with the default value used for that parameter 🎀 Only positions up toNPARAMSare accessed; defaults are used for higher-numbered parameters.PARAMS(LA_LINRX_ITREF_I = 1)— whether to perform iterative refinement or not.- Default:
1.0D+0 = 0.0: no refinement is performed, and no error bounds are computed.= 1.0: use the extra-precise refinement algorithm.- (other values are reserved for future use 👀)
- Default:
PARAMS(LA_LINRX_ITHRESH_I = 2)— maximum number of residual computations allowed for refinement.- Default:
10 - Aggressive: set to
100to permit convergence using approximate factorizations or factorizations other than LU. But fr fr, if the factorization uses a technique other than Gaussian elimination, the guarantees inerr_bnds_normanderr_bnds_compmay no longer be trustworthy ⚠️
- Default:
PARAMS(LA_LINRX_CWISE_I = 3)— flag determining if the code will attempt to find a solution with small componentwise relative error in the double-precision algorithm. Positive is true,0.0is false.- Default:
1.0(attempt componentwise convergence) 💖
- Default:
WORK— WORK is aCOMPLEX*16array, dimension(5*N). It works. That's the whole personality 🛠️RWORK— RWORK is aDOUBLE PRECISIONarray, dimension(2*N). The real one of the two, literally 💜
and yes, INFO is right there next, we're getting to it — hold that thought 🦋
INFO—INTEGER. Bestie, this is the receipts section for what just happened, and the tea is:= 0— Successful exit. The solution to every right-hand side is guaranteed. Slay. ✨< 0— IfINFO = -i, the i-th argument had an illegal value. Not iconic. 💀> 0 and <= N—U(INFO,INFO)is exactly zero. The factorization has been completed, but the factorUis exactly singular, so the solution and error bounds could not be computed.RCOND = 0is returned. Big yikes.= N+J— The solution corresponding to the Jth right-hand side is not guaranteed. The solutions corresponding to other right-hand sides K with K > J may not be guaranteed as well, but only the first such right-hand side is reported. If a small componentwise error is not requested (PARAMS(3) = 0.0) then the Jth right-hand side is the first with a normwise error bound that is not guaranteed (the smallest J such thatERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0) the Jth right-hand side is the first with either a normwise or componentwise error bound that is not guaranteed (the smallest J such that eitherERR_BNDS_NORM(J,1) = 0.0orERR_BNDS_COMP(J,1) = 0.0). See the definition ofERR_BNDS_NORM(:,1)andERR_BNDS_COMP(:,1). To get information about all of the right-hand sides checkERR_BNDS_NORMorERR_BNDS_COMP.
🫶 Author 🫶
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
📌 Definition at line 📌
Definition at line 502 of file zhesvxx.f.
💅 subroutine zsysvxx 💅
subroutine zsysvxx (character fact, character uplo, integer n, integer nrhs,
complex*16, dimension( lda, * ) a, integer lda, complex*16, dimension(
ldaf, * ) af, integer ldaf, integer, dimension( * ) ipiv, character
equed, double precision, dimension( * ) s, complex*16, dimension( ldb, *
) b, integer ldb, complex*16, dimension( ldx, * ) x, integer ldx, double
precision rcond, double precision rpvgrw, double precision, dimension( *
) berr, integer n_err_bnds, double precision, dimension( nrhs, * )
err_bnds_norm, double precision, dimension( nrhs, * ) err_bnds_comp,
integer nparams, double precision, dimension( * ) params, complex*16,
dimension( * ) work, double precision, dimension( * ) rwork, integer
info)
ZSYSVXX computes the solution to system of linear equations A * X = B for SY matrices.
✨ Purpose ✨
Okay so, ZSYSVXX uses the diagonal pivoting factorization to compute the solution to a complex*16 system of linear equations A * X = B, where A is an N-by-N symmetric matrix and X and B are N-by-NRHS matrices. Obsessed with the efficiency. 💖
If requested, both normwise and maximum componentwise error bounds are returned. ZSYSVXX will return a solution with a tiny guaranteed error (O(eps) where eps is the working machine precision) unless the matrix is very ill-conditioned, in which case a warning is returned. Relevant condition numbers also are calculated and returned. Numbers? Calculated. Bounds? Returned. We love a thorough queen. 👑
ZSYSVXX accepts user-provided factorizations and equilibration factors; see the definitions of the FACT and EQUED options. Solving with refinement and using a factorization from a previous ZSYSVXX call will also produce a solution with either O(eps) errors or warnings, but we cannot make that claim for general user-provided factorizations and equilibration factors if they differ from what ZSYSVXX would itself produce. Read that again, bestie — user-provided stuff is not automatically getting the same guarantee. 🫶
🌈 Description 🌈
The following steps are performed:
- If
FACT = 'E', double precision scaling factors are computed to equilibrate the system:
diag(S)*A*diag(S) *inv(diag(S))*X = diag(S)*B
Whether or not the system will be equilibrated depends on the scaling of the matrix A, but if equilibration is used, A is overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
- If
FACT = 'N'or'E', the LU decomposition is used to factor the matrixA(after equilibration ifFACT = 'E') as
A = U * D * U**T, if UPLO = 'U', or
A = L * D * L**T, if UPLO = 'L',
where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is symmetric and block diagonal with 1-by-1 and 2-by-2 diagonal blocks. Block diagonal D has main character energy, honestly. ✨
- If some
D(i,i)=0, so thatDis exactly singular, then the routine returns withINFO = i. Otherwise, the factored form ofAis used to estimate the condition number of the matrixA(see argumentRCOND). If the reciprocal of the condition number is less than machine precision, the routine still goes on to solve forXand compute error bounds as described below. It does not give up. It keeps going. Resilient icon behavior. 💅 - The system of equations is solved for
Xusing the factored form ofA. - By default (unless
PARAMS(LA_LINRX_ITREF_I)is set to zero), the routine will use iterative refinement to try to get a small error and error bounds. Refinement calculates the residual to at least twice the working precision. Double precision residual? She said “do it properly.” 🔥 - If equilibration was used, the matrix
Xis premultiplied bydiag(R)so that it solves the original system before equilibration.
Some optional parameters are bundled in the PARAMS array. These settings determine how refinement is performed, but often the defaults are acceptable. If the defaults are acceptable, users can pass NPARAMS = 0 which prevents the source code from accessing the PARAMS argument. Lowkey the “just use the defaults” shortcut is a gift. 🎀
🎀 Parameters 🎀
FACT—CHARACTER*1. Specifies whether or not the factored form of the matrixAis supplied on entry, and if not, whether the matrixAshould be equilibrated before it is factored.= 'F': On entry,AFandIPIVcontain the factored form ofA. IfEQUEDis not'N', the matrixAhas been equilibrated with scaling factors given byS.A,AF, andIPIVare not modified.= 'N': The matrixAwill be copied toAFand factored.= 'E': The matrixAwill be equilibrated if necessary, then copied toAFand factored.
UPLO—CHARACTER*1.= 'U': Upper triangle ofAis stored;= 'L': Lower triangle ofAis stored.
N—INTEGER. The number of linear equations, i.e., the order of the matrixA.N >= 0.NRHS—INTEGER. The number of right hand sides, i.e., the number of columns of the matricesBandX.NRHS >= 0.A—COMPLEX*16 array, dimension (LDA,N). The symmetric matrixA. IfUPLO = 'U', the leading N-by-N upper triangular part ofAcontains the upper triangular part of the matrixA, and the strictly lower triangular part ofAis not referenced. IfUPLO = 'L', the leading N-by-N lower triangular part ofAcontains the lower triangular part of the matrixA, and the strictly upper triangular part ofAis not referenced.
On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by diag(S)*A*diag(S).
LDA—INTEGER. The leading dimension of the arrayA.LDA >= max(1,N).AF—COMPLEX*16 array, dimension (LDAF,N). IfFACT = 'F', thenAFis an input argument and on entry contains the block diagonal matrixDand the multipliers used to obtain the factorUorLfrom the factorizationA = U*D*U**TorA = L*D*L**Tas computed byZSYTRF.
If FACT = 'N', then AF is an output argument and on exit returns the block diagonal matrix D and the multipliers used to obtain the factor U or L from the factorization A = U*D*U**T or A = L*D*L**T.
LDAF—INTEGER. The leading dimension of the arrayAF.LDAF >= max(1,N).IPIV—INTEGER array, dimension (N). IfFACT = 'F', thenIPIVis an input argument and on entry contains details of the interchanges and the block structure ofD, as determined byZSYTRF. IfIPIV(k) > 0, then rows and columnskandIPIV(k)were interchanged andD(k,k)is a 1-by-1 diagonal block. IfUPLO = 'U'andIPIV(k) = IPIV(k-1) < 0, then rows and columnsk-1and-IPIV(k)were interchanged andD(k-1:k,k-1:k)is a 2-by-2 diagonal block. IfUPLO = 'L'andIPIV(k) = IPIV(k+1) < 0, then rows and columnsk+1and-IPIV(k)were interchanged andD(k:k+1,k:k+1)is a 2-by-2 diagonal block.
If FACT = 'N', then IPIV is an output argument and on exit contains details of the interchanges and the block structure of D, as determined by ZSYTRF.
EQUED—CHARACTER*1. Specifies the form of equilibration that was done.= 'N': No equilibration (always true ifFACT = 'N').= 'Y': Both row and column equilibration, i.e.,Ahas been replaced bydiag(S) * A * diag(S).
EQUED is an input argument if FACT = 'F'; otherwise, it is an output argument.
S—
S
S is DOUBLE PRECISION array, dimension (N) — the scale factors for A 💅
If EQUED = 'Y', then A gets multiplied on the left and right by diag(S). S is an input argument when FACT = 'F'; otherwise S is an output argument. And if FACT = 'F' and EQUED = 'Y', every single element of S must be positive, no cap.
If S is an output, each element of S is a power of the radix. If S is an input, each element of S should be a power of the radix so you actually get a reliable solution and reliable error estimates 🫶 Scaling by powers of the radix doesn't cause rounding errors unless the result underflows or overflows.
Okay so this part matters: rounding errors during scaling lead to refining with a matrix that is not equivalent to the input matrix, which produces error estimates that may not be reliable. It's giving house of cards. Be careful. 😭
B
B is COMPLEX*16 array, dimension (LDB,NRHS) ✨
On entry: the N-by-NRHS right hand side matrix B.
On exit:
- if
EQUED = 'N',Bis not modified; - if
EQUED = 'Y',Bis overwritten bydiag(S)*B.
LDB
LDB is INTEGER — the leading dimension of the array B.
LDB >= max(1,N)
That's the vibe check, bestie. Respect it. 🎀
X
X is COMPLEX*16 array, dimension (LDX,NRHS) 🦋
If INFO = 0, this is the N-by-NRHS solution matrix X to the original system of equations.
Heads up though — note thatAandBare modified on exit ifEQUED .ne. 'N', and the solution to the equilibrated system isinv(diag(S))*X. That distinction is literally the whole plot. 💀
LDX
LDX is INTEGER — the leading dimension of the array X.
LDX >= max(1,N)
Same energy as LDB, different letter. Slay. 💜
RCOND
RCOND is DOUBLE PRECISION — the reciprocal scaled condition number 🔥
It's an estimate of the reciprocal Skeel condition number of the matrix A after equilibration (if equilibration was even done). If this is less than the machine precision — in particular, if it is zero — then the matrix is singular to working precision. Full stop.
But plot twist: the error may still be small even if this number is very small and the matrix appears ill-conditioned. Looks can be deceiving, iykyk. 🙈
RPVGRW
RPVGRW is DOUBLE PRECISION — reciprocal pivot growth 🌸
On exit, this contains the reciprocal pivot growth factor norm(A)/norm(U).
Ngl, the source text here literally just says "the norm is used" — the actual norm name got eaten somewhere in transmission, so that's all we've got. 🫠
If this is much less than 1, then the stability of the LU factorization of the (equilibrated) matrix A could be poor. That also means the solution X, the estimated condition numbers, and the error bounds could all be unreliable. Rough.
If factorization fails with 0<INFO<=N, then this contains the reciprocal pivot growth factor for the leading INFO columns of A.
BERR
BERR is DOUBLE PRECISION array, dimension (NRHS) — componentwise relative backward error, bestie 💖
This is the componentwise relative backward error of each solution vector X(j) — i.e. the smallest relative change in any element of A or B that makes X(j) an exact solution. Tiny little nudge, huge consequences. Iconic.
N_ERR_BNDS
N_ERR_BNDS is INTEGER — number of error bounds to return for each right hand side and each type (normwise or componentwise). ⭐
See ERR_BNDS_NORM and ERR_BNDS_COMP below 👇
ERR_BNDS_NORM
ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS) 🧚
For each right-hand side, this array contains info about various error bounds and condition numbers corresponding to the normwise relative error, defined like this:
Normwise relative error in the ith solution vector:
max_j (abs(XTRUE(j,i) - X(j,i)))
------------------------------
max_j abs(X(j,i))
The array is indexed by the type of error information as described below. There currently are up to three pieces of information returned.
The first index in ERR_BNDS_NORM(i,:) corresponds to the *i*th right-hand side.
The second index in ERR_BNDS_NORM(:,err) contains the following three fields 👑
err = 1— boolean. Trust the answer if the reciprocal condition number is less than the thresholdsqrt(n) * dlamch('Epsilon').err = 2— error bound: the estimated forward error, almost certainly within a factor of10of the true error so long as the next entry is greater than the thresholdsqrt(n) * dlamch('Epsilon'). This error bound should only be trusted if the previous boolean is true.err = 3— Reciprocal condition number: estimated normwise reciprocal condition number. Compared with the thresholdsqrt(n) * dlamch('Epsilon')to determine if the error estimate is (the source text cuts off right there, no shade to it, that's just how it arrived). These reciprocal condition numbers are1 / (norm(Z^{-1},inf) * norm(Z,inf))for some appropriately scaled matrixZ. LetZ = S*A, whereSscales each row by a power of the radix so all absolute row sums ofZare approximately1.
See Lapack Working Note 165 for further details and extra cautions. 📚
ERR_BNDS_COMP
ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS) 🍓
For each right-hand side, this array contains info about various error bounds and condition numbers corresponding to the componentwise relative error, defined like so:
Componentwise relative error in the ith solution vector:
abs(XTRUE(j,i) - X(j,i))
max_j ----------------------
abs(X(j,i))
The array is indexed by the right-hand side i (which is what the componentwise relative error depends on) and the type of error information as described below. There currently are up to three pieces of information returned for each right-hand side.
Important vibes: if componentwise accuracy is not requested (PARAMS(3) = 0.0), thenERR_BNDS_COMPis not accessed. And ifN_ERR_BNDS < 3, then at most the first(:,N_ERR_BNDS)entries are returned. 🫶
The first index in ERR_BNDS_COMP(i,:) corresponds to the *i*th right-hand side.
The second index in ERR_BNDS_COMP(:,err) contains these three fields:
err = 1— boolean. Trust the answer if the reciprocal condition number is less than the thresholdsqrt(n) * dlamch('Epsilon').err = 2— error bound: the estimated forward error, almost certainly within a factor of10of the true error so long as the next entry is greater than the thresholdsqrt(n) * dlamch('Epsilon'). This error bound should only be trusted if the previous boolean is true.err = 3— Reciprocal condition number: estimated componentwise reciprocal condition number. Compared with the thresholdsqrt(n) * dlamch('Epsilon')to determine if the error estimate is (again, the source text stops mid-sentence here — not me, I promise). These reciprocal condition numbers are1 / (norm(Z^{-1},inf) * norm(Z,inf))for some appropriately scaled matrixZ. LetZ = S*(A*diag(x)), wherexis the solution for the current right-hand side andSscales each row ofA*diag(x)by a power of the radix so all absolute row sums ofZare approximately1.
See Lapack Working Note 165 for further details and extra cautions. 📚 (yes, same note, she's the main character here)
NPARAMS
NPARAMS is INTEGER — specifies the number of parameters set in PARAMS 🌈
If <= 0, the PARAMS array is never referenced and default values are used. Respect the defaults, they're lowkey serving. 💅
PARAMS
PARAMS is DOUBLE PRECISION array, dimension NPARAMS — specifies algorithm parameters 🎀
If an entry is < 0.0, then that entry will be filled with the default value used for that parameter. Only positions up to NPARAMS are accessed; defaults are used for higher-numbered parameters. Neat, right?
PARAMS(LA_LINRX_ITREF_I = 1)— whether to perform iterative refinement or not. Default:1.0D+0= 0.0: no refinement is performed, and no error bounds are computed.= 1.0: use the extra-precise refinement algorithm.- (other values are reserved for future use)
PARAMS(LA_LINRX_ITHRESH_I = 2)— maximum number of residual computations allowed for refinement. Default:10Aggressive: set to100to permit convergence using approximate factorizations or factorizations other than LU.
Real talk: if the factorization uses a technique other than Gaussian elimination, the guarantees inerr_bnds_normanderr_bnds_compmay no longer be trustworthy. 🚩
PARAMS(LA_LINRX_CWISE_I = 3)— flag determining if the code will attempt to find a solution with small componentwise relative error in the double-precision algorithm. Positive is true,0.0is false. Default:1.0(attempt componentwise convergence)
WORK
WORK is COMPLEX*16 array, dimension (2*N) — that's her, the scratch space queen 👑
RWORK
RWORK is DOUBLE PRECISION array, dimension (2*N) — same energy, double precision edition 💜
INFO
INFO is INTEGER — and the source text cuts off right here, mid-entry, because the transmission ran out of road. 🫠 No more details made it through in this chunk — bestie, we'll see what the next part of the page has to say.
INFO is INTEGER — okay bestie, here's the exit-status tea: 🍵✨
= 0: successful exit, and every right-hand side's solution is guaranteed. 💖< 0: ifINFO = -i, that means the i-th argument had an illegal value. 😭> 0and<= N:U(INFO,INFO)is exactly zero. The factorization finished, but factor U is exactly singular, so the solution and error bounds could not be computed.RCOND = 0is returned. 💀= N+J: okay so the Jth right-hand side's solution is not guaranteed. Other right-hand sides K with K > J might also be not guaranteed, but only the first such right-hand side gets reported. If a small componentwise error is not requested (PARAMS(3) = 0.0), then the Jth right-hand side is the first one with a normwise error bound that's not guaranteed — literally the smallest J such thatERR_BNDS_NORM(J,1) = 0.0. By default (PARAMS(3) = 1.0), the Jth right-hand side is the first with either a normwise or componentwise error bound that's not guaranteed — the smallest J such that eitherERR_BNDS_NORM(J,1) = 0.0orERR_BNDS_COMP(J,1) = 0.0. Peep the definition ofERR_BNDS_NORM(:,1)andERR_BNDS_COMP(:,1)for the full story. Wanna know about all the right-hand sides? CheckERR_BNDS_NORMorERR_BNDS_COMP. 🔥
👑 Author 👑
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 502 of file zsysvxx.f.
🤖 Author 🤖
Generated automatically by Doxygen for LAPACK from the source code.
And that's the whole hesvxx(3) vibe from LAPACK version 3.12.0 — footer source/version check: iconic, no cap. Bye bestie! 💅✨🫶
📦 where this page comes from
- arch rolling: lapack-doc 3.12.1-2 · custom
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms