STRRFS(3)
π STRRFS(3) β like, the LAPACK manual page, but make it make sense π
Okay so bestie, real talk: this page lives in the Library Functions Manual, and it's the doc for /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/strrfs.f. Yes, that's the whole NAME section. It's giving "my address is my name" energy and honestly? Iconic. π
β¨ SYNOPSIS β¨
Functions/Subroutines β buckle up, there's exactly one function and she's a whole subroutine:
subroutine STRRFS (uplo, trans, diag, n, nrhs, a, lda, b, ldb, x, ldx,
ferr, berr, work, iwork, info)
That's her. That's STRRFS. π«Ά
πΈ Function/Subroutine Documentation πΈ
subroutine STRRFS (character uplo, character trans, character diag, integer
n, integer nrhs, real, dimension( lda, * ) a, integer lda, real,
dimension( ldb, * ) b, integer ldb, real, dimension( ldx, * ) x, integer
ldx, real, dimension( * ) ferr, real, dimension( * ) berr, real,
dimension( * ) work, integer, dimension( * ) iwork, integer info)
π¦ Purpose π¦
!> STRRFS provides error bounds and backward error estimates for the !> solution to a system of linear equations with a triangular !> coefficient matrix. !> !> The solution matrix X must be computed by STRTRS or some other !> means before entering this routine. STRRFS does not do iterative !> refinement because doing so cannot improve the backward error.
So like, she doesn't solve anything for you, okay? She's the vibe-check-after-the-fact girl. You already have your solution matrix X β from STRTRS or literally any other means β and now STRRFS tells you how much to trust it. And before you ask: no iterative refinement, because apparently doing so cannot improve the backward error. Not me questioning the math, the math said what it said. π
π§ Parameters π§
UPLOβCHARACTER*1. Which triangle are we even working with?
!> UPLO is CHARACTER*1 !> = 'U': A is upper triangular; !> = 'L': A is lower triangular.
TRANSβCHARACTER*1. Specifies the form of the system of equations, i.e. what shape the problem is wearing today:
!> TRANS is CHARACTER*1 !> Specifies the form of the system of equations: !> = 'N': A * X = B (No transpose) !> = 'T': AT * X = B (Transpose) !> = 'C': AH * X = B (Conjugate transpose = Transpose)
DIAGβCHARACTER*1. Is the diagonal doing its own thing or is it all ones?
!> DIAG is CHARACTER*1 !> = 'N': A is non-unit triangular; !> = 'U': A is unit triangular.
NβINTEGER. The order of the matrixA. Constraint:N >= 0.
!> N is INTEGER !> The order of the matrix A. N >= 0.
NRHSβINTEGER. The number of right hand sides, i.e., the number of columns of the matricesBandX. Constraint:NRHS >= 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βREAL array, dimension (LDA,N). The triangular matrix herself. Here's the tea π:
!> A is REAL array, dimension (LDA,N) !> The triangular matrix A. If UPLO = 'U', the leading N-by-N !> upper triangular part of the array A contains the upper !> triangular matrix, and the strictly lower triangular part of !> A is not referenced. If UPLO = 'L', the leading N-by-N lower !> triangular part of the array A contains the lower triangular !> matrix, and the strictly upper triangular part of A is not !> referenced. If DIAG = 'U', the diagonal elements of A are !> also not referenced and are assumed to be 1.
(Translation: half of A is literally not invited to the party. And if DIAG = 'U', the diagonal is also not referenced and is assumed to be 1. Not referenced means NOT REFERENCED, bestie. Don't come for me. π)
LDAβINTEGER. The leading dimension of the arrayA. Constraint:LDA >= max(1,N).
!> LDA is INTEGER !> The leading dimension of the array A. LDA >= max(1,N).
BβREAL array, dimension (LDB,NRHS). The right hand side matrixB. That's it, that's the whole description. Short queen. π
!> B is REAL array, dimension (LDB,NRHS) !> The right hand side matrix B.
LDBβINTEGER. The leading dimension of the arrayB. Constraint:LDB >= max(1,N).
!> LDB is INTEGER !> The leading dimension of the array B. LDB >= max(1,N).
XβREAL array, dimension (LDX,NRHS). The solution matrixX. Again: short and confident. π
!> X is REAL array, dimension (LDX,NRHS) !> The solution matrix X.
LDXβINTEGER. The leading dimension of the arrayX. Constraint:LDX >= max(1,N).
!> LDX is INTEGER !> The leading dimension of the array X. LDX >= max(1,N).
FERRβREAL array, dimension (NRHS). Okay this one's important, pay attention π₯:
!> FERR is REAL array, dimension (NRHS) !> The estimated forward error bound for each solution vector !> X(j) (the j-th column of the solution matrix X). !> If XTRUE is the true solution corresponding to X(j), FERR(j) !> is an estimated upper bound for the magnitude of the largest !> element in (X(j) - XTRUE) divided by the magnitude of the !> largest element in X(j). The estimate is as reliable as !> the estimate for RCOND, and is almost always a slight !> overestimate of the true error.
So FERR(j) is an estimated upper bound for the magnitude of the largest element in (X(j) - XTRUE) divided by the magnitude of the largest element in X(j). Reliability? Same as the estimate for RCOND, and it's almost always a slight overestimate of the true error. She's dramatic, she rounds up, we love her anyway. β¨
BERRβREAL array, dimension (NRHS). The glow-up metric:
!> BERR is REAL array, dimension (NRHS) !> 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).
Like, the smallest relative change in any element of A or B that makes X(j) an exact solution. Basically: "how much would I have to fudge reality for this to be perfect?" π¦
WORKβREAL array, dimension (3*N). Scratch space. Three N's worth of it.
!> WORK is REAL array, dimension (3*N)
IWORKβINTEGER array, dimension (N). Integer scratch space. One N's worth.
!> IWORK is INTEGER array, dimension (N)
INFOβINTEGER. The status report, the final verdict:
!> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -i, the i-th argument had an illegal value
So 0 means slay, and INFO = -i means the i-th argument had an illegal value. Named and shamed, one index at a time. π
π Author π
These absolute legends:
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 180 of file strrfs.f.
β Author (again, yes really) β
Generated automatically by Doxygen for LAPACK from the source code.
No human wrote this section and honestly you can tell. It's giving "the robot did its homework." π€
Anyway bestie, that's the whole page π«Ά β auto-generated by Doxygen for LAPACK from the source code, straight outta LAPACK Version 3.12.0, and the file herself is /home/abui...RC/strrfs.f(3). Go get those error bounds, queen. ππ
π¦ where this page comes from
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms