DTRT03(3)
πΈ DTRT03(3) β a LAPACK vibe check πΈ
okay so you're in the Library Functions Manual bestie, welcome π
and the star of today's episode is a little Fortran file living its best life at /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/TESTING/LIN/dtrt03.f. Yes that's the whole path. No I'm not shortening it, it's iconic. β¨
π NAME π
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/TESTING/LIN/dtrt03.f
like... that's her. that's the file. she tests things. π«Ά
β SYNOPSIS β
Functions/Subroutines
ok so there's exactly one function here and she's carrying the whole page:
subroutine DTRT03 (uplo, trans, diag, n, nrhs, a, lda, scale, cnorm,
tscal, x, ldx, b, ldb, work, resid)
DTRT03 β that's the name, that's the whole name, no cap. π
π¦ Function/Subroutine Documentation π¦
here's the full signature in all her glory, character by character, because we do not play about types in this house:
subroutine DTRT03 (character uplo, character trans, character diag, integer
n, integer nrhs, double precision, dimension( lda, * ) a, integer lda,
double precision scale, double precision, dimension( * ) cnorm, double
precision tscal, double precision, dimension( ldx, * ) x, integer ldx,
double precision, dimension( ldb, * ) b, integer ldb, double precision,
dimension( * ) work, double precision resid)
yeah. DTRT03. she's a whole subroutine. π₯
β¨ Purpose β¨ β the actual plot
DTRT03 computes the residual for the solution to a scaled triangular system of equationsA*x = s*borA'*x = s*b.
so picture it: A is a triangular matrix, A' is the transpose of A, s is a scalar, and x and b are N by NRHS matrices. and the test ratio is literally the maximum, over the number of right hand sides, of:
norm(s*b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS )
where op(A) means either A or A', and EPS is the machine epsilon. it's giving "how wrong are you, on a scale" energy and honestly? obsessed. π
π Parameters π (all sixteen of them, we're not skipping a single one)
UPLOβ isCHARACTER*1and tells you whether A is upper or lower triangular.= 'U': upper triangular π,= 'L': lower triangular π¦.TRANSβ isCHARACTER*1, specifies the operation applied to A.= 'N':A *x = s*b(no transpose) β¨,= 'T':A'*x = s*b(transpose) π₯,= 'C':A'*x = s*b(conjugate transpose = transpose, same thing here bestie,'C'is just'T'in a cuter outfit) π .DIAGβ isCHARACTER*1, says whether or not A is unit triangular.= 'N': non-unit triangular,= 'U': unit triangular π.Nβ isINTEGER, the order of the matrix A.N >= 0. zero is fine, we love a boundary case π.NRHSβ isINTEGER, the number of right hand sides, i.e. the number of columns of the matrices X and B.NRHS >= 0π«Ά.Aβ isDOUBLE PRECISION array, dimension (LDA,N), the triangular matrix A. IfUPLO = 'U', the leadingnbynupper triangular part of the arrayAcontains the upper triangular matrix, and the strictly lower triangular part ofAis not referenced (rude, but okay). IfUPLO = 'L', the leadingnbynlower triangular part of the arrayAcontains the lower triangular matrix, and the strictly upper triangular part ofAis not referenced. IfDIAG = 'U', the diagonal elements ofAare also not referenced and are assumed to be1. β¨LDAβ isINTEGER, the leading dimension of the arrayA.LDA >= max(1,N)π don't test her.SCALEβ isDOUBLE PRECISION, the scaling factorsused in solving the triangular system π.CNORMβ isDOUBLE PRECISION array, dimension (N), the 1-norms of the columns ofA, not counting the diagonal (again: diagonal erasure, we support it) πΈ.TSCALβ isDOUBLE PRECISION, the scaling factor used in computing the 1-norms inCNORM. fun fact:CNORMactually contains the column norms ofTSCAL*Aπ§.Xβ isDOUBLE PRECISION array, dimension (LDX,NRHS), the computed solution vectors for the system of linear equations. the main character of the whole operation honestly β.LDXβ isINTEGER, the leading dimension of the arrayX.LDX >= max(1,N)π¦.Bβ isDOUBLE PRECISION array, dimension (LDB,NRHS), the right hand side vectors for the system of linear equations π.LDBβ isINTEGER, the leading dimension of the arrayB.LDB >= max(1,N)π.WORKβ isDOUBLE PRECISION array, dimension (N). that's it. that's the description. she works. πRESIDβ isDOUBLE PRECISION, the maximum over the number of right hand sides of
norm(op(A)*x - s*b) / ( norm(op(A)) * norm(x) * EPS ).
this is the number you came for. the whole point. the final boss. π
β οΈ quick vibe check:LDA,LDX, andLDBall have>= max(1,N)requirements andN/NRHSboth have>= 0requirements β those are the documented constraints, so respect them or don't come crying to me π
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
four whole institutions contributed, we stan a collaborative effort π«ΆπΈ
Definition at line 167 of file dtrt03.f. go look, she's really there π
π§ Author (yes, another one) π§
Generated automatically by Doxygen for LAPACK from the source code. no human hand-wrote this page and honestly? you can tell. but we love her anyway π
π SEE ALSO π
not listed on this page bestie β the only thing this manpage points at is its own source file, dtrt03.f. iykyk π
π that's the whole page, no notes, no cap, ate and left no crumbs π
LAPACK β Version 3.12.0 β and the footer says /home/abui...IN/dtrt03.f(3), so like... that's the file, that's the version, that's the whole sign-off. mwah. πβ¨π¦π
π¦ 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