ZHPRFS(3)

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

πŸ’– 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's CHARACTER*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*16 array, 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) for 1<=i<=j;
    • if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.

(the indexing math is giving math-girl era, copy it exactly, do NOT freestyle it 🧚)

  • AFP β€” COMPLEX*16 array, 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 factorization A = U*D*U**H or A = L*D*L**H as computed by ZHPTRF, 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 by ZHPTRF. the lore ✨
  • B β€” COMPLEX*16 array, 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*16 array, dimension (LDX,NRHS). On entry: the solution matrix X, as computed by ZHPTRS. 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 PRECISION array, dimension (NRHS). The estimated forward error bound for each solution vector X(j) (the j-th column of the solution matrix X). So if XTRUE is the true solution corresponding to X(j), then FERR(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 in X(j). The estimate is as reliable as the estimate for RCOND, and is almost always a slight overestimate of the true error. (she's a little dramatic, she rounds up πŸ’€)
  • BERR β€” DOUBLE PRECISION array, dimension (NRHS). The componentwise relative backward error of each solution vector X(j) β€” like, the smallest relative change in any element of A or B that makes X(j) an exact solution. tiny changes, big consequences πŸ¦‹
  • WORK β€” COMPLEX*16 array, dimension (2*N). the workspace, doing her little job 🌸
  • RWORK β€” DOUBLE PRECISION array, dimension (N). more workspace, real-valued this time ⭐
  • INFO β€” INTEGER, the vibe check at the end:
    • = 0: successful exit βœ…
    • < 0: if INFO = -i, the i-th argument had an illegal value 🚩

🌈 Internal Parameters 🌈

  • ITMAX is 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 < 0 means you passed a bad argument and -i tells you which one. FERR is 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