porfs(3)

🌸 NAME

porfs β€” and fr fr the whole name is porfs: iterative refinement. That's it, that's the vibe. It's a library function, it lives in section 3, and it's about making your solution better. πŸ’…


✨ SYNOPSIS

Functions

       subroutine cporfs (uplo, n, nrhs, a, lda, af, ldaf, b, ldb, x, ldx,
           ferr, berr, work, rwork, info)
           CPORFS
       subroutine dporfs (uplo, n, nrhs, a, lda, af, ldaf, b, ldb, x, ldx,
           ferr, berr, work, iwork, info)
           DPORFS
       subroutine sporfs (uplo, n, nrhs, a, lda, af, ldaf, b, ldb, x, ldx,
           ferr, berr, work, iwork, info)
           SPORFS
       subroutine zporfs (uplo, n, nrhs, a, lda, af, ldaf, b, ldb, x, ldx,
           ferr, berr, work, rwork, info)
           ZPORFS

So there's four of them, one per precision, and they're all named <letter>porfs β€” the letter is basically the personality of the float you're working with. Iconic family lineup, honestly. πŸ‘‘


πŸ’– DESCRIPTION

Detailed Description

Okay so bestie, this is the part where the page usually gives you a big overview paragraph, but the actual details are tucked into each function's own docs down below. Scroll with me. 🫢


πŸŽ€ FUNCTION DOCUMENTATION


cporfs β€” CPORFS

subroutine cporfs (character uplo, integer n, integer nrhs, complex,
    dimension( lda, * ) a, integer lda, complex, dimension( ldaf, * ) af,
    integer ldaf, complex, dimension( ldb, * ) b, integer ldb, complex,
    dimension( ldx, * ) x, integer ldx, real, dimension( * ) ferr, real,
    dimension( * ) berr, complex, dimension( * ) work, real, dimension( * )
    rwork, integer info)

Purpose

Okay so here's the whole point: CPORFS improves the computed solution to a system of linear equations when the coefficient matrix is Hermitian positive definite, and it also hands you error bounds and backward error estimates for that solution. Basically your answer walked in looking cute and left looking correct. ✨

Parameters

  • UPLO β€” UPLO is CHARACTER*1. Which triangle are we even reading from, bestie? = 'U': Upper triangle of A is stored; = 'L': Lower triangle of A is stored.
  • N β€” N is INTEGER. The order of the matrix A. Requirement: N >= 0.
  • NRHS β€” NRHS is INTEGER. The number of right hand sides, i.e., the number of columns of the matrices B and X. Requirement: NRHS >= 0.
  • A β€” A is COMPLEX array, dimension (LDA,N). The Hermitian matrix A. If UPLO = 'U', the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced (it doesn't get a seat at the table). If UPLO = 'L', the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced. Pick a side, matrix. πŸ’…
  • LDA β€” LDA is INTEGER. The leading dimension of the array A. Requirement: LDA >= max(1,N).
  • AF β€” AF is COMPLEX array, dimension (LDAF,N). The triangular factor U or L from the Cholesky factorization A = U**H*U or A = L*L**H, as computed by CPOTRF. So like, the glow-up A already went through. 🌸
  • LDAF β€” LDAF is INTEGER. The leading dimension of the array AF. Requirement: LDAF >= max(1,N).
  • B β€” B is COMPLEX array, dimension (LDB,NRHS). The right hand side matrix B. The "what you asked for" side of the equation.
  • LDB β€” LDB is INTEGER. The leading dimension of the array B. Requirement: LDB >= max(1,N).
  • X β€” X is COMPLEX array, dimension (LDX,NRHS). On entry, the solution matrix X, as computed by CPOTRS. On exit, the improved solution matrix X. Not me handing you back a better version of your own answer 😭✨
  • LDX β€” LDX is INTEGER. The leading dimension of the array X. Requirement: LDX >= max(1,N).
  • FERR β€” FERR is REAL array, dimension (NRHS). The estimated forward error bound for each solution vector X(j) (the j-th column of the solution matrix X). If XTRUE is the true solution corresponding to X(j), 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). That estimate is as reliable as the estimate for RCOND, and is almost always a slight overestimate of the true error. So she's a little dramatic, but she's honest. πŸ’€
  • BERR β€” BERR is REAL array, dimension (NRHS). The componentwise relative backward error of each solution vector X(j) (i.e., the smallest relative change in any element of A or B that makes X(j) an exact solution). Basically how much would we have to fudge the inputs before your answer was technically perfect. πŸ™ˆ
  • WORK β€” WORK is COMPLEX array, dimension (2*N). Scratch space, doing the invisible labor, no credit taken.
  • RWORK β€” RWORK is REAL array, dimension (N). More scratch space, this time the real kind.
  • INFO β€” INFO is INTEGER. The vibe report:
    • = 0: successful exit. πŸŽ‰
    • < 0: if INFO = -i, the i-th argument had an illegal value. So like, somebody typed something cursed into slot i.

Internal Parameters

  • ITMAX is the maximum number of steps of iterative refinement. That's the "how many glow-up passes are we willing to do" number. πŸ”₯

Author

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

Definition

Definition at line 181 of file cporfs.f.


dporfs β€” DPORFS

subroutine dporfs (character uplo, integer n, integer nrhs, double
    precision, dimension( lda, * ) a, integer lda, double precision,
    dimension( ldaf, * ) af, integer ldaf, double precision, dimension( ldb,
    * ) b, integer ldb, double precision, dimension( ldx, * ) x, integer
    ldx, double precision, dimension( * ) ferr, double precision, dimension(
    * ) berr, double precision, dimension( * ) work, integer, dimension( * )
    iwork, integer info)

Purpose

DPORFS improves the computed solution to a system of linear equations when the coefficient matrix is symmetric positive definite, and provides error bounds and backward error estimates for the solution. Same energy as CPORFS, except the matrix is symmetric not Hermitian, and everything's DOUBLE PRECISION. She's the same girl in a different outfit. πŸ¦‹

Parameters

  • UPLO β€” UPLO is CHARACTER*1. = 'U': Upper triangle of A is stored; = 'L': Lower triangle of A is stored.
  • N β€” N is INTEGER. The order of the matrix A. Requirement: N >= 0.
  • NRHS β€” NRHS is INTEGER. The number of right hand sides, i.e., the number of columns of the matrices B and X. Requirement: NRHS >= 0.
  • A β€” A is DOUBLE PRECISION array, dimension (LDA,N). The symmetric matrix A. If UPLO = 'U', the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If UPLO = 'L', the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced.
  • LDA β€” LDA is INTEGER. The leading dimension of the array A. Requirement: LDA >= max(1,N).
  • AF β€” AF is DOUBLE PRECISION array, dimension (LDAF,N). The triangular factor U or L from the Cholesky factorization A = U**T*U or A = L*L**T, as computed by DPOTRF. Note the **T bestie β€” transpose, not conjugate-transpose, because symmetric. Details matter. πŸ’…
  • LDAF β€” LDAF is INTEGER. The leading dimension of the array AF. Requirement: LDAF >= max(1,N).
  • B β€” B is DOUBLE PRECISION array, dimension (LDB,NRHS). The right hand side matrix B.
  • LDB β€” LDB is INTEGER. The leading dimension of the array B. Requirement: LDB >= max(1,N).
  • X β€” X is DOUBLE PRECISION array, dimension (LDX,NRHS). On entry, the solution matrix X, as computed by DPOTRS. On exit, the improved solution matrix X. ✨
  • LDX β€” LDX is INTEGER. The leading dimension of the array X. Requirement: LDX >= max(1,N).
  • FERR β€” FERR is 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). If XTRUE is the true solution corresponding to X(j), 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.
  • BERR β€” BERR is DOUBLE PRECISION array, dimension (NRHS). The componentwise relative backward error of each solution vector X(j) (i.e., the smallest relative change in any element of A or B that makes X(j) an exact solution).
  • WORK β€” WORK is DOUBLE PRECISION array, dimension (3*N). Note: 3*N here, not 2*N β€” she's a whole extra N of scratch space. Highkey generous.
  • IWORK β€” IWORK is INTEGER array, dimension (N). Integer scratch space (yep, IWORK, no RWORK in this one β€” the real scratch and the integer scratch are two different things, don't get it twisted).
  • INFO β€” INFO is INTEGER.
    • = 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.

Author

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

Definition

Definition at line 181 of file dporfs.f.


sporfs β€” SPORFS

subroutine sporfs (character uplo, integer n, integer nrhs, real, dimension(
    lda, * ) a, integer lda, real, dimension( ldaf, * ) af, integer ldaf,
    real, dimension( ldb, * ) b, integer ldb, real, dimension( ldx, * ) x,
    integer ldx, real, dimension( * ) ferr, real, dimension( * ) berr, real,
    dimension( * ) work, integer, dimension( * ) iwork, integer info)

Purpose

SPORFS improves the computed solution to a system of linear equations when the coefficient matrix is symmetric positive definite, and provides error bounds and backward error estimates for the solution. Yeah, same description as DPORFS β€” she just does it in REAL instead of DOUBLE PRECISION. Consistency is a love language. πŸ’œ

Parameters

  • UPLO β€” UPLO is CHARACTER*1. = 'U': Upper triangle of A is stored; = 'L': Lower triangle of A is stored.
  • N β€” N is INTEGER. The order of the matrix A. Requirement: N >= 0.
  • NRHS β€” NRHS is INTEGER. The number of right hand sides, i.e., the number of columns of the matrices B and X. Requirement: NRHS >= 0.
  • A β€” ...

okay part 1 ends mid-parameter right here β€” SPORFS's A and everything after it is waiting for you in part 2, so don't close the tab bestie πŸ’…πŸ«Ά

  • A β€” okay so A is a REAL array, dimension (LDA,N). It's the symmetric matrix A. If UPLO = 'U', the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If UPLO = 'L', the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced. πŸ’…
  • LDA β€” LDA is INTEGER. It's the leading dimension of the array A, and the rule is LDA >= max(1,N). no cap. ✨
  • AF β€” AF is a REAL array, dimension (LDAF,N). It holds the triangular factor U or L from the Cholesky factorization A = U**T*U or A = L*L**T, as computed by SPOTRF. iconic. πŸŽ€
  • LDAF β€” LDAF is INTEGER. It's the leading dimension of the array AF, and LDAF >= max(1,N). πŸ¦‹
  • B β€” B is a REAL array, dimension (LDB,NRHS). It's the right hand side matrix B. periodt. 🌸
  • LDB β€” LDB is INTEGER. It's the leading dimension of the array B, and LDB >= max(1,N). πŸ’–
  • X β€” X is a REAL array, dimension (LDX,NRHS). On entry, it's the solution matrix X, as computed by SPOTRS. On exit, it's the improved solution matrix X. glow-up fr fr. ✨
  • LDX β€” LDX is INTEGER. It's the leading dimension of the array X, and LDX >= max(1,N). 🫢
  • FERR β€” FERR is a REAL array, dimension (NRHS). It's the estimated forward error bound for each solution vector X(j) β€” that's the j-th column of the solution matrix X. 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. bestie, it's giving cautious but useful. 😭
  • BERR β€” BERR is a REAL array, dimension (NRHS). It's the componentwise relative backward error of each solution vector X(j) β€” i.e., the smallest relative change in any element of A or B that makes X(j) an exact solution. πŸ”₯
  • WORK β€” WORK is a REAL array, dimension (3*N). it's the workspace, don't question it. 🧚
  • IWORK β€” IWORK is an INTEGER array, dimension (N). integer workspace vibes. πŸ’œ
  • INFO β€” INFO is INTEGER, and here's the status tea:
    • = 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. that's the limit, bestie. πŸŽ€

🌸 Author

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

Definition at line 181 of file sporfs.f.


πŸ¦‹ subroutine zporfs

subroutine zporfs (character uplo, integer n, integer nrhs, complex*16,
    dimension( lda, * ) a, integer lda, complex*16, dimension( ldaf, * ) af,
    integer ldaf, 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)

this one's called ZPORFS and yes she's the complex queen. πŸ‘‘

πŸŽ€ Purpose

ZPORFS improves the computed solution to a system of linear equations when the coefficient matrix is Hermitian positive definite, and provides error bounds and backward error estimates for the solution. literally the aftercare routine for your linear solve. πŸ’–

🌟 Parameters

  • UPLO β€” UPLO is CHARACTER*1, and it's giving triangle choice:
    • = 'U': Upper triangle of A is stored;
    • = 'L': Lower triangle of A is stored. πŸ¦‹
  • N β€” N is INTEGER. It's the order of the matrix A, and N >= 0. 🌸
  • NRHS β€” NRHS is INTEGER. It's the number of right hand sides, i.e., the number of columns of the matrices B and X. NRHS >= 0. πŸ’…
  • A β€” A is a COMPLEX*16 array, dimension (LDA,N). It's the Hermitian matrix A. If UPLO = 'U', the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If UPLO = 'L', the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced. ✨
  • LDA β€” LDA is INTEGER. It's the leading dimension of the array A, and LDA >= max(1,N). 🫢
  • AF β€” AF is a COMPLEX*16 array, dimension (LDAF,N). It holds the triangular factor U or L from the Cholesky factorization A = U**H*U or A = L*L**H, as computed by ZPOTRF. πŸ’–
  • LDAF β€” LDAF is INTEGER. It's the leading dimension of the array AF, and LDAF >= max(1,N). πŸŽ€
  • B β€” B is a COMPLEX*16 array, dimension (LDB,NRHS). It's the right hand side matrix B. 🌈
  • LDB β€” LDB is INTEGER. It's the leading dimension of the array B, and LDB >= max(1,N). ⭐
  • X β€” X is a COMPLEX*16 array, dimension (LDX,NRHS). On entry, it's the solution matrix X, as computed by ZPOTRS. On exit, it's the improved solution matrix X. main character energy. πŸ‘‘
  • LDX β€” LDX is INTEGER. It's the leading dimension of the array X, and LDX >= max(1,N). πŸ¦‹
  • FERR β€” FERR is a DOUBLE PRECISION array, dimension (NRHS). It's the estimated forward error bound for each solution vector X(j) β€” the j-th column of the solution matrix X. 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. 😭
  • BERR β€” BERR is a DOUBLE PRECISION array, dimension (NRHS). It's the componentwise relative backward error of each solution vector X(j) β€” i.e., the smallest relative change in any element of A or B that makes X(j) an exact solution. πŸ”₯
  • WORK β€” WORK is a COMPLEX*16 array, dimension (2*N). workspace but make it complex. πŸ’œ
  • RWORK β€” RWORK is a DOUBLE PRECISION array, dimension (N). real workspace doing real work. 🫢
  • INFO β€” INFO is INTEGER, and the status tea is:
    • = 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. same rule, bestie. πŸ’…

🌸 Author

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

Definition at line 181 of file zporfs.f.

🫢 Author

Generated automatically by Doxygen for LAPACK from the source code. the robot wrote this bit, and honestly? slay. πŸ€–βœ¨


bye bestie β€” this was LAPACK Version 3.12.0, page porfs(3), generated automatically by Doxygen for LAPACK from the source code. drink water, check your INFO, and stay iconic. πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from