ZHPT01(3)
π ZHPT01(3) β like, the LAPACK test-routine era π
okay so bestie, quick vibe check: this is a page from the LAPACK Library Functions Manual, and it lives at this absolutely unhinged path:
/home/abuild/rpmbuild/BUILD/lapack-
static-3.12.0-build/lapack-3.12.0/TESTING/LIN/zhpt01.f
(also written as /home/abui...IN/zhpt01.f(3) up in the corner, because paths are long and life is short β¨)
π¦ SYNOPSIS π¦
Functions/Subroutines
subroutine ZHPT01 (uplo, n, a, afac, ipiv, c, ldc, rwork, resid)β ZHPT01
π Function/Subroutine Documentation π
subroutine ZHPT01 (character uplo, integer n, complex*16, dimension( * ) a, complex*16, dimension( * ) afac, integer, dimension( * ) ipiv, complex*16, dimension( ldc, * ) c, integer ldc, double precision, dimension( * ) rwork, double precision resid)
ZHPT01
β¨ Purpose β¨
!>
!> ZHPT01 reconstructs a Hermitian indefinite packed matrix A from its
!> block L*D*L' or U*D*U' factorization and computes the residual
!> norm( C - A ) / ( N * norm(A) * EPS ),
!> where C is the reconstructed matrix, EPS is the machine epsilon,
!> L' is the conjugate transpose of L, and U' is the conjugate transpose
!> of U.
!>
so basically: take a Hermitian indefinite packed matrix A, rebuild it from its block L*D*L' or U*D*U' factorization, and then check how close you got with norm( C - A ) / ( N * norm(A) * EPS ). C is the reconstructed matrix, EPS is machine epsilon, L' is the conjugate transpose of L, and U' is the conjugate transpose of U. that's it, that's the whole personality π
πΈ Parameters πΈ
UPLOβUPLO is CHARACTER*1. tells us which triangle of the Hermitian matrixAis stored:= 'U'means upper triangular,= 'L'means lower triangular. pick a side, bestie π«ΆNβN is INTEGER. the number of rows and columns of the matrixA. constraint era:N >= 0(yes, zero counts, we don't discriminate).AβA is COMPLEX*16 array, dimension (N*(N+1)/2). the original Hermitian matrixA, stored as a packed triangular matrix. packed. no wasted space. lowkey iconic πAFACβAFAC is COMPLEX*16 array, dimension (N*(N+1)/2). the factored form of the matrixA, also stored as a packed triangular matrix.AFACcontains the block diagonal matrixDand the multipliers used to obtain the factorLorUfrom the blockL*D*L'orU*D*U'factorization, as computed byZHPTRF. the receipts, basically π§ΎIPIVβIPIV is INTEGER array, dimension (N). the pivot indices fromZHPTRF. π―CβC is COMPLEX*16 array, dimension (LDC,N). that's the output-ish matrix, the glow-up version π¦LDCβLDC is INTEGER. the leading dimension of the arrayC. rule:LDC >= max(1,N). respect the constraint or don't come to the group chat πRWORKβRWORK is DOUBLE PRECISION array, dimension (N). scratch space, doing the real work behind the scenes πRESIDβRESID is DOUBLE PRECISION. the final answer, the whole point:- if
UPLO = 'L':norm(L*D*L' - A) / ( N * norm(A) * EPS ) - if
UPLO = 'U':norm(U*D*U' - A) / ( N * norm(A) * EPS )
- if
copy it character for character, i don't make the rules β¨
π Author π
the legends themselves:
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 112 of file zhpt01.f.
β Author (again, yes really) β
Generated automatically by Doxygen for LAPACK from the source code. no human wrote this bit, the robot did π€π
so yeah, that's ZHPT01. check your Hermitian packed reconstruction residual, hydrate, and stan LAPACK. periodt. ππ
β cute sign-off: this was LAPACK, Version 3.12.0, and the page you were reading is /home/abui...IN/zhpt01.f(3) ππ«Άβ¨
π¦ 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