ZTRT02(3)

πŸ“¦ version 3.12.0, in opensuse-leap 16.0

πŸŽ€ 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 a CHARACTER*1 and tells us whether A is upper or lower triangular, iykyk πŸ’…
    • = 'U': upper triangular πŸ‘‘
    • = 'L': lower triangular πŸ¦‹
  • TRANS β€” is a CHARACTER*1 and specifies the operation applied to A.
    • = '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 a CHARACTER*1, specifies whether or not the matrix A is unit triangular.
    • = 'N': non-unit triangular
    • = 'U': unit triangular
  • N β€” is INTEGER, the order of the matrix A. N >= 0. zero is allowed, she's not gatekeeping 🫢
  • NRHS β€” is INTEGER, the number of right hand sides, i.e., the number of columns of the matrices X and B. NRHS >= 0.
  • A β€” is COMPLEX*16 array, dimension (LDA,N). it's the triangular matrix A fr fr. 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 (she's literally not looking at it πŸ’€). 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 β€” that's right, they're a given, no questions asked πŸ’…
  • LDA β€” is INTEGER, the leading dimension of the array A. LDA >= max(1,N).
  • X β€” is COMPLEX*16 array, dimension (LDX,NRHS). the computed solution vectors for the system of linear equations πŸ’– (the "look what you did" pile)
  • LDX β€” is INTEGER, the leading dimension of the array X. LDX >= max(1,N).
  • B β€” is COMPLEX*16 array, dimension (LDB,NRHS). the right hand side vectors for the system of linear equations 🌸
  • LDB β€” is INTEGER, the leading dimension of the array B. LDB >= max(1,N).
  • WORK β€” is COMPLEX*16 array, dimension (N). scratch space bestie, don't ask questions πŸŽ€
  • RWORK β€” is DOUBLE PRECISION array, dimension (N). more scratch space, but make it real-valued ✨
  • RESID β€” is DOUBLE 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 your UPLO, check your TRANS, and check that DIAG assumption 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