DTRT03(3)

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

🌸 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 equations A*x = s*b or A'*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 β€” is CHARACTER*1 and tells you whether A is upper or lower triangular. = 'U': upper triangular 🌈, = 'L': lower triangular πŸ¦‹.
  • TRANS β€” is CHARACTER*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 β€” is CHARACTER*1, says whether or not A is unit triangular. = 'N': non-unit triangular, = 'U': unit triangular πŸ‘‘.
  • N β€” is INTEGER, the order of the matrix A. N >= 0. zero is fine, we love a boundary case πŸŽ€.
  • 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 DOUBLE PRECISION 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 (rude, but okay). 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. ✨
  • LDA β€” is INTEGER, the leading dimension of the array A. LDA >= max(1,N) πŸ’€ don't test her.
  • SCALE β€” is DOUBLE PRECISION, the scaling factor s used in solving the triangular system πŸ’–.
  • CNORM β€” is DOUBLE PRECISION array, dimension (N), the 1-norms of the columns of A, not counting the diagonal (again: diagonal erasure, we support it) 🌸.
  • TSCAL β€” is DOUBLE PRECISION, the scaling factor used in computing the 1-norms in CNORM. fun fact: CNORM actually contains the column norms of TSCAL*A 🧚.
  • X β€” is DOUBLE PRECISION array, dimension (LDX,NRHS), the computed solution vectors for the system of linear equations. the main character of the whole operation honestly ⭐.
  • LDX β€” is INTEGER, the leading dimension of the array X. LDX >= max(1,N) πŸ¦‹.
  • B β€” is DOUBLE PRECISION 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 DOUBLE PRECISION array, dimension (N). that's it. that's the description. she works. πŸ’…
  • RESID β€” is DOUBLE 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, and LDB all have >= max(1,N) requirements and N/NRHS both have >= 0 requirements β€” 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