STPT01(3)
π STPT01(3) β like, the manual page, bestie
okay so this is STPT01, and it lives in the Library Functions Manual (that's the manual name, cute right?). It's a LAPACK testing routine, and honestly? She's a vibe. Let's get into it π
The whole file situation is:
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/TESTING/LIN/stpt01.f
That's the path, no cap, copy it exactly if you need it πβ¨
β¨ SYNOPSIS β¨
Functions/Subroutines π¦
subroutine STPT01 (uplo, diag, n, ap, ainvp, rcond, work, resid)β yep, that's her.STPT01.
πΈ Function/Subroutine Documentation πΈ
subroutine STPT01 (character uplo, character diag, integer n, real, dimension( * ) ap, real, dimension( * ) ainvp, real rcond, real, dimension( * ) work, real resid)
STPT01 β that's the name again, just so we're all on the same page π
π― Purpose:
STPT01computes the residual for a triangular matrix A times its inverse when A is stored in packed format:RESID = norm(A*AINV - I) / ( N * norm(A) * norm(AINV) * EPS ),where EPS is the machine epsilon.
So basically she's the vibe check for A*Aβ»ΒΉ β I. If the residual comes back smol, slay. If notβ¦ π
π«Ά Parameters
UPLO
UPLOisCHARACTER*1Specifies whether the matrix A is upper or lower triangular. -= 'U': Upper triangular -= 'L': Lower triangular
Pick your fighter, bestie. Up or down, no in-between π
DIAG
DIAGisCHARACTER*1Specifies whether or not the matrix A is unit triangular. -= 'N': Non-unit triangular -= 'U': Unit triangular
Unit triangular means the diagonal is all ones β main character energy only π
N
NisINTEGERThe order of the matrix A.N >= 0.
It's giving "the size of everything." And yes, N >= 0, not negative, we don't do that here π
AP
APisREALarray, dimension(N*(N+1)/2)The original upper or lower triangular matrix A, packed columnwise in a linear array. The j-th column of A is stored in the array AP as follows: - ifUPLO = 'U',AP((j-1)*j/2 + i) = A(i,j)for1<=i<=j; - ifUPLO = 'L',AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
Not me memorizing the packing index formula π fr fr keep those expressions exactly as they are, they're load-bearing π
AINVP
AINVPisREALarray, dimension(N*(N+1)/2)On entry, the (triangular) inverse of the matrix A, packed columnwise in a linear array as in AP. On exit, the contents ofAINVPare destroyed.
β οΈ Heads up bestie β she does not leave AINVP the way she found it. On exit it's destroyed. Gone. Iconic but ruthless π
RCOND
RCONDisREALThe reciprocal condition number of A, computed as1/(norm(A) * norm(AINV)).
Reciprocal condition number β the way that she's just the inverse of a product, we love a simple queen π
WORK
WORKisREALarray, dimension(N)
Scratch space. Her little workspace. Let her cook π
RESID
RESIDisREALnorm(A*AINV - I) / ( N * norm(A) * norm(AINV) * EPS )
The final answer, the moment of truth, the grade on the exam β
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Absolute legends, all four, no debate π«Ά
π Definition at line 107 of file stpt01.f.
Like, literally line 107. Go look. We'll wait π§
π Author
Generated automatically by Doxygen for LAPACK from the source code.
(so nobody hand-wrote this section, it's Doxygen doing its thing, cute for it β¨)
okay bestie that's the whole page π hand-copied-by-nobody, Doxygen-generated, part of LAPACK Version 3.12.0 and the file lives at /home/abui...IN/stpt01.f(3) β byeee, go test some triangular matrices, 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