STPT02(3)

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

πŸ’… STPT02(3) β€” like, the Library Functions Manual entry, bestie πŸŽ€

okay so this is the STPT02 page from the Library Functions Manual, and the file it lives in is literally:

/home/abuild/rpmbuild/BUILD/lapack-
static-3.12.0-build/lapack-3.12.0/TESTING/LIN/stpt02.f

that's the NAME, no cap. it's a .f file, it's Fortran, it's giving "we test things here" ✨


✨ SYNOPSIS ✨

Functions/Subroutines πŸ¦‹

  • subroutine STPT02 (uplo, trans, diag, n, nrhs, ap, x, ldx, b, ldb, work, resid) β€” the whole squad, assembled. also: it's STPT02. that's it. that's the subtitle. πŸ’€

🌸 Function/Subroutine Documentation 🌸

subroutine STPT02 (character uplo, character trans, character diag, integer
    n, integer nrhs, real, dimension( * ) ap, real, dimension( ldx, * ) x,
    integer ldx, real, dimension( ldb, * ) b, integer ldb, real, dimension(
    * ) work, real resid)

STPT02 β€” yes queen, that's the name again, she's consistent πŸ‘‘

🎯 Purpose 🎯

!> !> STPT02 computes the residual for the computed solution to a !> triangular system of linear equations op(A)*X = B, when the !> triangular matrix A is stored in packed format. The test ratio is !> the maximum over !> norm(b - op(A)*x) / ( ||op(A)||_1 * norm(x) * EPS ), !> where op(A) = A or A**T, b is the column of B, x is the solution !> vector, and EPS is the machine epsilon. !> The norm used is the 1-norm. !>

so basically, bestie: she's checking how good your answer is 🫢 she takes the residual of the computed solution to a triangular system op(A)*X = B, where A is triangular and stored in packed format β€” and the test ratio is the max over that whole fraction up there. and the norm? the 1-norm, always, periodt. πŸ”₯


πŸ’– Parameters πŸ’–

  • UPLO β€” UPLO is CHARACTER*1. tells you whether A is upper or lower triangular: = 'U': upper triangular ⬆️, = 'L': lower triangular ⬇️.
  • TRANS β€” TRANS is CHARACTER*1. the operation being applied to A: = 'N': A * X = B (No transpose), = 'T': A**T * X = B (Transpose), = 'C': A**H * X = B (Conjugate transpose = Transpose). yes she said conjugate transpose equals transpose, for real matrices it literally does, iykyk 🧚
  • DIAG β€” DIAG is CHARACTER*1. is the matrix A unit triangular or not: = 'N': non-unit triangular, = 'U': unit triangular.
  • N β€” N is INTEGER. the order of the matrix A. N >= 0. πŸ’«
  • NRHS β€” NRHS is INTEGER. how many right hand sides β€” aka the number of columns of the matrices X and B. NRHS >= 0.
  • AP β€” AP is REAL array, dimension (N*(N+1)/2). the upper or lower triangular matrix A, packed columnwise in a linear array. the j-th column of A sits in AP like this:
    • if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
    • if UPLO = 'L', AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.

copy those indices exactly, do NOT freestyle them, that's the whole vibe check 😭

  • X β€” X is REAL array, dimension (LDX,NRHS). the computed solution vectors for the system of linear equations. the main character, honestly πŸ‘‘
  • LDX β€” LDX is INTEGER. the leading dimension of the array X. LDX >= max(1,N). πŸ“
  • B β€” B is REAL array, dimension (LDB,NRHS). the right hand side vectors for the system of linear equations.
  • LDB β€” LDB is INTEGER. the leading dimension of the array B. LDB >= max(1,N).
  • WORK β€” WORK is REAL array, dimension (N). that's it. that's the whole description. she works. πŸ’€
  • RESID β€” RESID is REAL. the maximum over the number of right hand sides of norm(op(A)*X - B) / ( norm(op(A)) * norm(X) * EPS ). this is the answer-answer, the final score, the moment 🌈

πŸ‘‘ Author πŸ‘‘

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

the whole collective ate, fr fr πŸ’…

Definition at line 140 of file stpt02.f.


πŸ’œ Author πŸ’œ

Generated automatically by Doxygen for LAPACK from the source code. so nobody hand-wrote this page, a robot did it, and we respect the robot πŸ™ˆ


and that's the whole page, bestie β€” no notes, no cap, slay πŸŽ€

lowkey reminder: every number, every = 'U', every AP((j-1)*j/2 + i) index stays exactly as written. she's cute but she's also precise. periodt. πŸ’…

sign-off time: this icon was running the LAPACK edition of the docs, Version 3.12.0, and the file was living at /home/abui...IN/stpt02.f(3) β€” mwah, bye bestie πŸ¦‹πŸ’–

πŸ“¦ where this page comes from