TESTING/LIN/strt05.f(3)
π TESTING/LIN/strt05.f π
okay so bestie, welcome to the strt05 page from the LAPACK Library Functions Manual β it's a Fortran test routine and honestly it's giving "quietly doing the most important work in the room" energy β¨
πΈ NAME πΈ
TESTING/LIN/strt05.f β no cap, that's the whole name, that's the file, that's the icon π
β¨ SYNOPSIS β¨
Functions/Subroutines
subroutine strt05 (uplo, trans, diag, n, nrhs, a, lda, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)β the whole squad, assembled. also known as justSTRT05π«
π¦ Function/Subroutine Documentation π¦
subroutine strt05 (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( ldxact, * ) xact, integer ldxact, real, dimension( * ) ferr, real, dimension( * ) berr, real, dimension( * ) reslts)
STRT05 π
Purpose:
so what does she do? she tests error bounds, bestie. specifically:
STRT05 tests the error bounds from iterative refinement for the computed solution to a system of equations A*X = B, where A is a triangular n by n matrix.
and then the receipts π:
RESLTS(1) = test of the error bound = norm(X - XACT) / ( norm(X) * FERR ) A large value is returned if this ratio is not less than one.
RESLTS(2) = residual from the iterative refinement routine = the maximum of BERR / ( (n+1)EPS + () ), where (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
likeβ¦ she's literally measuring how far off you are. main character energy fr fr π
π Parameters π
UPLO
UPLO is CHARACTER*1 Specifies whether the matrix A is upper or lower triangular. = 'U': Upper triangular = 'L': Lower triangular
which triangle are we working with, bestie? pick one π«Ά
TRANS
TRANS is CHARACTER*1 Specifies the form of the system of equations. = 'N': A * X = B (No transpose) = 'T': A'* X = B (Transpose) = 'C': A'* X = B (Conjugate transpose = Transpose)
flip it or don't flip it, your call β¨ (and yes, for real matrices 'C' and 'T' are the same thing β the manpage literally says Conjugate transpose = Transpose, that's not me making stuff up π
)
DIAG
DIAG is CHARACTER*1 Specifies whether or not the matrix A is unit triangular. = 'N': Non-unit triangular = 'U': Unit triangular
is the diagonal doing its own thing or is it just 1s? π
N
N is INTEGER The number of rows of the matrices X, B, and XACT, and the order of the matrix A. N >= 0.
the size of the whole situation. lowkey important. N >= 0 periodt π
NRHS
NRHS is INTEGER The number of columns of the matrices X, B, and XACT. NRHS >= 0.
how many right-hand sides we're serving today π
A
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.
the star of the show β¨ note that half of her is ignored depending on UPLO, and if DIAG = 'U' the diagonal is not referenced and just assumed to be 1 β she doesn't even look at it, iconic tbh π
LDA
LDA is INTEGER The leading dimension of the array A. LDA >= max(1,N).
LDA >= max(1,N), don't test her π€
B
B is REAL array, dimension (LDB,NRHS) The right hand side vectors for the system of linear equations.
the right hand side. the other side of the equation. the co-star π
LDB
LDB is INTEGER The leading dimension of the array B. LDB >= max(1,N).
LDB >= max(1,N) π«Ά
X
X is REAL array, dimension (LDX,NRHS) The computed solution vectors. Each vector is stored as a column of the matrix X.
the computed solution β like, what the algorithm actually gave you, not necessarily the truth π
LDX
LDX is INTEGER The leading dimension of the array X. LDX >= max(1,N).
LDX >= max(1,N) β
XACT
XACT is REAL array, dimension (LDX,NRHS) The exact solution vectors. Each vector is stored as a column of the matrix XACT.
the exact ones. the ones from before everything got messy π (word for word the manpage says these are dimensioned (LDX,NRHS) β copy that exactly, bestie, don't @ me)
LDXACT
LDXACT is INTEGER The leading dimension of the array XACT. LDXACT >= max(1,N).
LDXACT >= max(1,N) π«
FERR
FERR is REAL array, dimension (NRHS) The estimated forward error bounds for each solution vector X. If XTRUE is the true solution, FERR bounds the magnitude of the largest entry in (X - XTRUE) divided by the magnitude of the largest entry in X.
the estimated forward error bound per solution vector β she's putting a bound on how big that biggest entry of (X - XTRUE) can get relative to the biggest entry in X π₯
BERR
BERR is REAL array, dimension (NRHS) The componentwise relative backward error of each solution vector (i.e., the smallest relative change in any entry of A or B that makes X an exact solution).
the componentwise relative backward error β i.e. the smallest relative change in any entry of A or B that would make X exact. tiny change, huge glow-up π
RESLTS
RESLTS is REAL array, dimension (2) The maximum over the NRHS solution vectors of the ratios: RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR ) RESLTS(2) = BERR / ( (n+1)EPS + () )
the final verdict, dimension (2), maxed over all the NRHS solution vectors:
RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR ) RESLTS(2) = BERR / ( (n+1)EPS + () )
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
(collectively: the legends π«Ά)
Definition at line 179 of file strt05.f.
π Author (the meta one) π
Generated automatically by Doxygen for LAPACK from the source code.
bestie she was generated. she was born ready by Doxygen. no cap π€β¨
that's the whole page, you ate it up π the manual name is TESTING/LIN/strt05.f in case you forgot, and this gorgeous thing is from LAPACK Version 3.12.0 π go off, queen β see you in the next manpage ππ
π¦ 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