gerfs(3)

πŸ’– NAME πŸ’–

okay so we're doing gerfs today, and the full government name is gerfs: iterative refinement. That's the whole name section. She's gerfs, she's from the Library Functions Manual, and she refines things iteratively. Iconic behavior, no notes. πŸ‘‘


✨ SYNOPSIS ✨

bestie there are exactly four flavors of this function and they are the same girl in four different outfits β€” the only thing that changes is the precision type and which workspace array she asks for. Slay.

πŸ’… Functions

subroutine cgerfs (trans, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x,
    ldx, ferr, berr, work, rwork, info)

β†’ CGERFS

subroutine dgerfs (trans, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x,
    ldx, ferr, berr, work, iwork, info)

β†’ DGERFS

subroutine sgerfs (trans, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x,
    ldx, ferr, berr, work, iwork, info)

β†’ SGERFS

subroutine zgerfs (trans, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x,
    ldx, ferr, berr, work, rwork, info)

β†’ ZGERFS


🌈 Detailed Description 🌈

literally the entire page is the function docs, so there's no big intro paragraph to get through. We go straight to the good stuff. Buckle up, bestie. πŸŽ€


πŸ¦‹ Function Documentation πŸ¦‹

🌸 subroutine cgerfs (character trans, integer n, integer nrhs, complex, dimension( lda, * ) a, integer lda, complex, dimension( ldaf, * ) af, integer ldaf, integer, dimension( * ) ipiv, 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) 🌸

CGERFS

⭐ Purpose

CGERFS improves the computed solution to a system of linear equations and provides error bounds and backward error estimates for the solution.

ok so she takes your already-computed answer and makes it better, and then she hands you receipts β€” error bounds and backward error estimates β€” for how good it actually is. main character energy, honestly. πŸ’œ

⭐ Parameters

  • TRANS β€” it's a CHARACTER*1, and it specifies the form of the system of equations, so pay attention:
    • = 'N': A * X = B (No transpose)
    • = 'T': A**T * X = B (Transpose)
    • = 'C': A**H * X = B (Conjugate transpose)
  • N β€” N is INTEGER, the order of the matrix A. Constraint: N >= 0. Zero is allowed, she's not gonna be weird about it.
  • NRHS β€” NRHS is INTEGER, the number of right hand sides, i.e., the number of columns of the matrices B and X. Constraint: NRHS >= 0.
  • A β€” A is COMPLEX array, dimension (LDA,N). The original N-by-N matrix A. Your O.G. matrix, untouched.
  • LDA β€” LDA is INTEGER, the leading dimension of the array A. Constraint: LDA >= max(1,N).
  • AF β€” AF is COMPLEX array, dimension (LDAF,N). The factors L and U from the factorization A = P*L*U as computed by CGETRF.
  • LDAF β€” LDAF is INTEGER, the leading dimension of the array AF. Constraint: LDAF >= max(1,N).
  • IPIV β€” IPIV is INTEGER array, dimension (N). The pivot indices from CGETRF; for 1<=i<=N, row i of the matrix was interchanged with row IPIV(i). The receipts of who swapped with whom. 🫢
  • B β€” B is COMPLEX array, dimension (LDB,NRHS). The right hand side matrix B.
  • LDB β€” LDB is INTEGER, the leading dimension of the array B. Constraint: LDB >= max(1,N).
  • X β€” X is COMPLEX array, dimension (LDX,NRHS). On entry, the solution matrix X, as computed by CGETRS. On exit, the improved solution matrix X. She goes in mid and comes out upgraded. ✨
  • LDX β€” LDX is INTEGER, the leading dimension of the array X. Constraint: 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). The estimate is as reliable as the estimate for RCOND, and is almost always a slight overestimate of the true error. Yes she lowkey errs on the side of caution, that's just her vibe. 🌸
  • 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).
  • WORK β€” WORK is COMPLEX array, dimension (2*N).
  • RWORK β€” RWORK is REAL array, dimension (N).
  • 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.

(the whole point of the function, in one parameter 🧚)

⭐ Author

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

⭐ Definition at line 184 of file cgerfs.f.


πŸ¦‹ subroutine dgerfs (character trans, integer n, integer nrhs, double precision, dimension( lda, * ) a, integer lda, double precision, dimension( ldaf, * ) af, integer ldaf, integer, dimension( * ) ipiv, 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) πŸ¦‹

DGERFS

⭐ Purpose

DGERFS improves the computed solution to a system of linear equations and provides error bounds and backward error estimates for the solution.

same mission, double precision edition. πŸ’…

⭐ Parameters

  • TRANS β€” CHARACTER*1. Specifies the form of the system of equations:
    • = 'N': A * X = B (No transpose)
    • = 'T': A**T * X = B (Transpose)
    • = 'C': A**H * X = B (Conjugate transpose = Transpose)
  • N β€” INTEGER. The order of the matrix A. Constraint: N >= 0.
  • NRHS β€” INTEGER. The number of right hand sides, i.e., the number of columns of the matrices B and X. Constraint: NRHS >= 0.
  • A β€” DOUBLE PRECISION array, dimension (LDA,N). The original N-by-N matrix A.
  • LDA β€” INTEGER. The leading dimension of the array A. Constraint: LDA >= max(1,N).
  • AF β€” DOUBLE PRECISION array, dimension (LDAF,N). The factors L and U from the factorization A = P*L*U as computed by DGETRF.
  • LDAF β€” INTEGER. The leading dimension of the array AF. Constraint: LDAF >= max(1,N).
  • IPIV β€” INTEGER array, dimension (N). The pivot indices from DGETRF; for 1<=i<=N, row i of the matrix was interchanged with row IPIV(i).
  • B β€” DOUBLE PRECISION array, dimension (LDB,NRHS). The right hand side matrix B.
  • LDB β€” INTEGER. The leading dimension of the array B. Constraint: LDB >= max(1,N).
  • X β€” DOUBLE PRECISION array, dimension (LDX,NRHS). On entry, the solution matrix X, as computed by DGETRS. On exit, the improved solution matrix X.
  • LDX β€” INTEGER. The leading dimension of the array X. Constraint: 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). 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 β€” 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 β€” DOUBLE PRECISION array, dimension (3*N). Not the same size as the complex one, bestie, watch out β€” this one's 3*N. πŸ‘€
  • IWORK β€” INTEGER array, dimension (N).
  • INFO β€” 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 at line 183 of file dgerfs.f.


🌺 subroutine sgerfs (character trans, integer n, integer nrhs, real, dimension( lda, * ) a, integer lda, real, dimension( ldaf, * ) af, integer ldaf, integer, dimension( * ) ipiv, 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) 🌺

SGERFS

⭐ Purpose

SGERFS improves the computed solution to a system of linear equations and provides error bounds and backward error estimates for the solution.

single precision sweetie, same energy. πŸ“

⭐ Parameters

  • TRANS β€” CHARACTER*1. Specifies the form of the system of equations:
    • = 'N': A * X = B (No transpose)
    • = 'T': A**T * X = B (Transpose)
    • = 'C': A**H * X = B (Conjugate transpose = Transpose)
  • N β€” INTEGER. The order of the matrix A. Constraint: N >= 0.
  • NRHS β€” INTEGER. The number of right hand sides, i.e., the number of columns of the matrices B and X. Constraint: NRHS >= 0.
  • A β€” REAL array, dimension (LDA,N). The original N-by-N matrix A.
  • LDA β€” INTEGER. The leading dimension of the array A. Constraint: LDA >= max(1,N).
  • AF β€” …

and that's literally where part 1 of this page cuts off 😭 AF is about to get its whole explanation, but we ran out of page. Part 2 picks it right back up, fr fr. 🫢

Continuing at AF in the sgerfs parameter list β€” we’re so back, bestie. πŸ’…

  • AF β€” REAL array, dimension (LDAF,N). It’s holding the factors L and U from the factorization A = P*L*U, exactly as SGETRF computed them. 🫢
  • LDAF β€” INTEGER. The leading dimension of the array AF. Must be LDAF >= max(1,N). No improvising.
  • IPIV β€” INTEGER array, dimension (N). The pivot indices from SGETRF; for 1<=i<=N, row i of the matrix was interchanged with row IPIV(i). Iconic row-shuffling behavior.
  • B β€” REAL array, dimension (LDB,NRHS). The right hand side matrix B. It’s giving β€œwhat we’re solving for” energy.
  • LDB β€” INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • X β€” REAL array, dimension (LDX,NRHS). On entry, the solution matrix X, as computed by SGETRS. On exit, the improved solution matrix X. Glow-up arc, honestly. ✨
  • LDX β€” INTEGER. The leading dimension of the array X. LDX >= max(1,N).
  • FERR β€” 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), 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. So it’s a little extra, not a lie. 😭
  • BERR β€” 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). Tiny changes, big meaning. πŸ’œ
  • WORK β€” REAL array, dimension (3*N). Scratch space. Do not perceive it.
  • IWORK β€” INTEGER array, dimension (N). More scratch, but integer-flavored.
  • INFO β€” INTEGER. Exit tea: = 0: successful exit; < 0: if INFO = -i, the i-th argument had an illegal value. Read the leaves. πŸ’€

Internal Parameters πŸŽ€

  • ITMAX β€” the maximum number of steps of iterative refinement. It’s the step budget, bestie. πŸ”₯

Author πŸ‘‘

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

Definition at line 183 of file sgerfs.f.


ZGERFS πŸ¦‹

Okay, complex double precision era. ZGERFS has entered the group chat, and it’s serving COMPLEX*16 with a DOUBLE PRECISION side of error bounds. Periodt.

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

Purpose ✨

ZGERFS improves the computed solution to a system of linear equations and provides error bounds and backward error estimates for the solution. Basically: make the answer better, then tell you how much to trust it. 🫢

Parameters πŸ’œ

  • TRANS β€” CHARACTER*1. Specifies the form of the system of equations:
    • = 'N': A * X = B (No transpose)
    • = 'T': A**T * X = B (Transpose)
    • = 'C': A**H * X = B (Conjugate transpose)
  • N β€” INTEGER. The order of the matrix A. N >= 0.
  • NRHS β€” INTEGER. The number of right hand sides, i.e., the number of columns of the matrices B and X. NRHS >= 0.
  • A β€” COMPLEX*16 array, dimension (LDA,N). The original N-by-N matrix A.
  • LDA β€” INTEGER. The leading dimension of the array A. LDA >= max(1,N).
  • AF β€” COMPLEX*16 array, dimension (LDAF,N). The factors L and U from the factorization A = P*L*U as computed by ZGETRF.
  • LDAF β€” INTEGER. The leading dimension of the array AF. LDAF >= max(1,N).
  • IPIV β€” INTEGER array, dimension (N). The pivot indices from ZGETRF; for 1<=i<=N, row i of the matrix was interchanged with row IPIV(i).
  • 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).
  • X β€” COMPLEX*16 array, dimension (LDX,NRHS). On entry, the solution matrix X, as computed by ZGETRS. On exit, the improved solution matrix X.
  • 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). 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 β€” 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 β€” COMPLEX*16 array, dimension (2*N).
  • RWORK β€” DOUBLE PRECISION array, dimension (N).
  • INFO β€” INTEGER. = 0: successful exit; < 0: if INFO = -i, the i-th argument had an illegal value.

Internal Parameters πŸŽ€

  • ITMAX β€” the maximum number of steps of iterative refinement. Same step budget, now with complex flavor. πŸ’…

Author πŸ‘‘

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

Definition at line 184 of file zgerfs.f.

Author 🫢

Generated automatically by Doxygen for LAPACK from the source code.


That’s the whole page, bestie. Source/version and footer tag: LAPACK Version 3.12.0, gerfs(3). Go forth and refine iteratively. πŸ’–βœ¨

πŸ“¦ where this page comes from