ZTRT02(3)
π ZTRT02 β the girlies' guide to checking your triangular solve β¨
okay so bestie, buckle up π
this is a Fortran subroutine living in /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/TESTING/LIN/ztrt02.f β yes that's the whole path, she's got a long government name and she's proud of it π
it's a Library Functions Manual entry, and honestly? it's giving "quality assurance but make it fashion" πΈ
β¨ SYNOPSIS β¨
Functions/Subroutines π¦
subroutine ZTRT02 (uplo, trans, diag, n, nrhs, a, lda, x, ldx, b, ldb,
work, rwork, resid)
girl. look at that parameter list. it's a whole entourage π
ZTRT02
that's it. that's the name. iconic, no notes.
π Function/Subroutine Documentation π
the actual signature (she's long, she's detailed, she ate) π₯
subroutine ZTRT02 (character uplo, character trans, character diag, integer
n, integer nrhs, complex*16, dimension( lda, * ) a, integer lda,
complex*16, dimension( ldx, * ) x, integer ldx, complex*16, dimension(
ldb, * ) b, integer ldb, complex*16, dimension( * ) work, double
precision, dimension( * ) rwork, double precision resid)
ZTRT02
π«Ά Purpose:
fortran !> !> ZTRT02 computes the residual for the computed solution to a !> triangular system of linear equations op(A)*X = B, where A is a !> triangular matrix. The test ratio is the maximum over !> norm(b - op(A)*x) / ( ||op(A)||_1 * norm(x) * EPS ), !> where op(A) = A, A**T, or A**H, b is the column of B, x is the !> solution vector, and EPS is the machine epsilon. !>
so basically: you solved a triangular system, congrats π now she's gonna check your work like the world's most attentive bestie going "no babe, show me your receipts." she computes the residual β the max over all the right-hand sides of
norm(b - op(A)*x) / ( ||op(A)||_1 * norm(x) * EPS )
and op(A) can be A, A**T, or A**H, b is the column of B, x is the solution vector, and EPS is the machine epsilon β¨ (she's tiny but she matters π)
π Parameters π
UPLOβ is aCHARACTER*1and tells us whetherAis upper or lower triangular, iykyk π= 'U': upper triangular π= 'L': lower triangular π¦
TRANSβ is aCHARACTER*1and specifies the operation applied toA.= 'N':A * X = B(no transpose, she's doing nothing extra, and honestly good for her)= 'T':A**T * X = B(transpose)= 'C':A**H * X = B(conjugate transpose, the fancy one β¨)
DIAGβ is aCHARACTER*1, specifies whether or not the matrixAis unit triangular.= 'N': non-unit triangular= 'U': unit triangular
Nβ isINTEGER, the order of the matrixA.N >= 0. zero is allowed, she's not gatekeeping π«ΆNRHSβ isINTEGER, the number of right hand sides, i.e., the number of columns of the matricesXandB.NRHS >= 0.Aβ isCOMPLEX*16array, dimension(LDA,N). it's the triangular matrixAfr fr. ifUPLO = 'U', the leading n by n upper triangular part of the arrayAcontains the upper triangular matrix, and the strictly lower triangular part ofAis not referenced (she's literally not looking at it π). ifUPLO = 'L', the leading n by n lower 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β that's right, they're a given, no questions asked πLDAβ isINTEGER, the leading dimension of the arrayA.LDA >= max(1,N).Xβ isCOMPLEX*16array, dimension(LDX,NRHS). the computed solution vectors for the system of linear equations π (the "look what you did" pile)LDXβ isINTEGER, the leading dimension of the arrayX.LDX >= max(1,N).Bβ isCOMPLEX*16array, 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β isCOMPLEX*16array, dimension(N). scratch space bestie, don't ask questions πRWORKβ isDOUBLE PRECISIONarray, dimension(N). more scratch space, but make it real-valued β¨RESIDβ isDOUBLE PRECISION, the maximum over the number of right hand sides of
norm(op(A)*X - B) / ( norm(op(A)) * norm(X) * EPS ).
that's the whole point of the whole routine and she serves it on a platter π
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
the whole squad contributed, we love a collab π«Ά
Definition at line 153 of file ztrt02.f. (go look, she's right there π
)
β Author (again, but make it meta) β
Generated automatically by Doxygen for LAPACK from the source code π€β¨ β yes she was born from a doc generator and she's still main character energy.
ngl bestie, if you're reading this because your residual came back huge, that's not a vibe. check yourUPLO, check yourTRANS, and check thatDIAGassumption about the ones on the diagonal. the math doesn't lie ππ
LAPACK Β· Version 3.12.0 Β· /home/abui...IN/ztrt02.f(3) β and that's the whole page, mwah π slay, go check those residuals, periodt. πππ
π¦ 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