ZHPRFS(3)
π NAME π
ok so this file is literally /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/zhprfs.f β yes bestie that's the whole name, it's giving "my full legal name is on the birth certificate" energy π
and it lives in the Library Functions Manual section, file zhprfs.f(3). Periodt.
β¨ SYNOPSIS β¨
Functions/Subroutines
okay so there's exactly one icon in here and she's serving:
subroutine ZHPRFS (uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, ferr,
berr, work, rwork, info)
that's it. that's the girl. ZHPRFS π
π¦ Function/Subroutine Documentation π¦
subroutine ZHPRFS (character uplo, integer n, integer nrhs, complex*16,
dimension( * ) ap, complex*16, dimension( * ) afp, integer, dimension( *
) ipiv, complex*16, dimension( ldb, * ) b, integer ldb, complex*16,
dimension( ldx, * ) x, integer ldx, double precision, dimension( * )
ferr, double precision, dimension( * ) berr, complex*16, dimension( * )
work, double precision, dimension( * ) rwork, integer info)
ZHPRFS β she's the full signature, no cuts, no edits, we stan a thorough queen π
π Purpose π
!>
!> ZHPRFS improves the computed solution to a system of linear
!> equations when the coefficient matrix is Hermitian indefinite
!> and packed, and provides error bounds and backward error estimates
!> for the solution.
!>
so basically: you already got a solution, and it's lowkey not perfect (when is anything π). ZHPRFS comes in and improves it β for a system of linear equations where the coefficient matrix is Hermitian indefinite and packed β and then hands you the receipts: error bounds and backward error estimates for the solution. main character behavior honestly πβ¨
Parameters
okay buckle up bestie, there are a LOT of them and every single one matters:
UPLOβ this one'sCHARACTER*1:= 'U': upper triangle of A is stored π¬= 'L': lower triangle of A is stored π¬
Nβ INTEGER, the order of the matrix A.N >= 0. (no negative sizes, that's not a vibe π)NRHSβ INTEGER, the number of right hand sides, i.e., the number of columns of the matrices B and X.NRHS >= 0.APβCOMPLEX*16array, dimension(N*(N+1)/2). This is the upper or lower triangle of the Hermitian matrix A, packed columnwise in a linear array. The j-th column of A is stored in the array AP like this:- if
UPLO = 'U',AP(i + (j-1)*j/2) = A(i,j)for1<=i<=j; - if
UPLO = 'L',AP(i + (j-1)*(2*n-j)/2) = A(i,j)forj<=i<=n.
- if
(the indexing math is giving math-girl era, copy it exactly, do NOT freestyle it π§)
AFPβCOMPLEX*16array, dimension(N*(N+1)/2). The factored form of the matrix A. AFP contains the block diagonal matrix D and the multipliers used to obtain the factor U or L from the factorizationA = U*D*U**HorA = L*D*L**Has computed byZHPTRF, stored as a packed triangular matrix. πIPIVβ INTEGER array, dimension(N). All the details of the interchanges and the block structure of D, as determined byZHPTRF. the lore β¨BβCOMPLEX*16array, dimension(LDB,NRHS). The right hand side matrix B. π«ΆLDBβ INTEGER, the leading dimension of the array B.LDB >= max(1,N). don't skip this check bestie πXβCOMPLEX*16array, dimension(LDX,NRHS). On entry: the solution matrix X, as computed byZHPTRS. On exit: the improved solution matrix X. glow-up confirmed π β¨LDXβ INTEGER, the leading dimension of the array X.LDX >= max(1,N).FERRβDOUBLE PRECISIONarray, dimension(NRHS). The estimated forward error bound for each solution vectorX(j)(the j-th column of the solution matrix X). So if XTRUE is the true solution corresponding toX(j), thenFERR(j)is an estimated upper bound for the magnitude of the largest element in(X(j) - XTRUE)divided by the magnitude of the largest element inX(j). The estimate is as reliable as the estimate forRCOND, and is almost always a slight overestimate of the true error. (she's a little dramatic, she rounds up π)BERRβDOUBLE PRECISIONarray, dimension(NRHS). The componentwise relative backward error of each solution vectorX(j)β like, the smallest relative change in any element of A or B that makesX(j)an exact solution. tiny changes, big consequences π¦WORKβCOMPLEX*16array, dimension(2*N). the workspace, doing her little job πΈRWORKβDOUBLE PRECISIONarray, dimension(N). more workspace, real-valued this time βINFOβ INTEGER, the vibe check at the end:= 0: successful exit β< 0: ifINFO = -i, the i-th argument had an illegal value π©
π Internal Parameters π
ITMAXis the maximum number of steps of iterative refinement. (she iterates, she refines, she does not stop until ITMAX, iykyk)
Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
the whole group chat contributed, we love a collab π«Άπ
Definition at line 178 of file zhprfs.f.
Author
Generated automatically by Doxygen for LAPACK from the source code. (yes she was birthed by a doc generator, we don't judge, she's still iconic π)
ok real talk bestie:INFO < 0means you passed a bad argument and-itells you which one.FERRis almost always a slight overestimate β that's just how she is. no cap.
k bye ily, this was LAPACK, Version 3.12.0, dated at /home/abui...RC/zhprfs.f(3) β 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