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 aCHARACTER*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βNisINTEGER, the order of the matrixA. Constraint:N >= 0. Zero is allowed, she's not gonna be weird about it.NRHSβNRHSisINTEGER, the number of right hand sides, i.e., the number of columns of the matricesBandX. Constraint:NRHS >= 0.AβAisCOMPLEXarray, dimension(LDA,N). The original N-by-N matrixA. Your O.G. matrix, untouched.LDAβLDAisINTEGER, the leading dimension of the arrayA. Constraint:LDA >= max(1,N).AFβAFisCOMPLEXarray, dimension(LDAF,N). The factorsLandUfrom the factorizationA = P*L*Uas computed byCGETRF.LDAFβLDAFisINTEGER, the leading dimension of the arrayAF. Constraint:LDAF >= max(1,N).IPIVβIPIVisINTEGERarray, dimension(N). The pivot indices fromCGETRF; for1<=i<=N, rowiof the matrix was interchanged with rowIPIV(i). The receipts of who swapped with whom. π«ΆBβBisCOMPLEXarray, dimension(LDB,NRHS). The right hand side matrixB.LDBβLDBisINTEGER, the leading dimension of the arrayB. Constraint:LDB >= max(1,N).XβXisCOMPLEXarray, dimension(LDX,NRHS). On entry, the solution matrixX, as computed byCGETRS. On exit, the improved solution matrixX. She goes in mid and comes out upgraded. β¨LDXβLDXisINTEGER, the leading dimension of the arrayX. Constraint:LDX >= max(1,N).FERRβFERRisREALarray, dimension(NRHS). The estimated forward error bound for each solution vectorX(j)(the j-th column of the solution matrixX). IfXTRUEis the true solution corresponding toX(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 inX(j). The estimate is as reliable as the estimate forRCOND, 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βBERRisREALarray, dimension(NRHS). The componentwise relative backward error of each solution vectorX(j)(i.e., the smallest relative change in any element ofAorBthat makesX(j)an exact solution).WORKβWORKisCOMPLEXarray, dimension(2*N).RWORKβRWORKisREALarray, dimension(N).INFOβINFOisINTEGER:= 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 matrixA. Constraint:N >= 0.NRHSβINTEGER. The number of right hand sides, i.e., the number of columns of the matricesBandX. Constraint:NRHS >= 0.AβDOUBLE PRECISIONarray, dimension(LDA,N). The original N-by-N matrixA.LDAβINTEGER. The leading dimension of the arrayA. Constraint:LDA >= max(1,N).AFβDOUBLE PRECISIONarray, dimension(LDAF,N). The factorsLandUfrom the factorizationA = P*L*Uas computed byDGETRF.LDAFβINTEGER. The leading dimension of the arrayAF. Constraint:LDAF >= max(1,N).IPIVβINTEGERarray, dimension(N). The pivot indices fromDGETRF; for1<=i<=N, rowiof the matrix was interchanged with rowIPIV(i).BβDOUBLE PRECISIONarray, dimension(LDB,NRHS). The right hand side matrixB.LDBβINTEGER. The leading dimension of the arrayB. Constraint:LDB >= max(1,N).XβDOUBLE PRECISIONarray, dimension(LDX,NRHS). On entry, the solution matrixX, as computed byDGETRS. On exit, the improved solution matrixX.LDXβINTEGER. The leading dimension of the arrayX. Constraint: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 matrixX). IfXTRUEis the true solution corresponding toX(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 inX(j). The estimate is as reliable as the estimate forRCOND, and is almost always a slight overestimate of the true error.BERRβDOUBLE PRECISIONarray, dimension(NRHS). The componentwise relative backward error of each solution vectorX(j)(i.e., the smallest relative change in any element ofAorBthat makesX(j)an exact solution).WORKβDOUBLE PRECISIONarray, dimension(3*N). Not the same size as the complex one, bestie, watch out β this one's3*N. πIWORKβINTEGERarray, 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 matrixA. Constraint:N >= 0.NRHSβINTEGER. The number of right hand sides, i.e., the number of columns of the matricesBandX. Constraint:NRHS >= 0.AβREALarray, dimension(LDA,N). The original N-by-N matrixA.LDAβINTEGER. The leading dimension of the arrayA. 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βREALarray, dimension(LDAF,N). Itβs holding the factorsLandUfrom the factorizationA = P*L*U, exactly asSGETRFcomputed them. π«ΆLDAFβINTEGER. The leading dimension of the arrayAF. Must beLDAF >= max(1,N). No improvising.IPIVβINTEGERarray, dimension(N). The pivot indices fromSGETRF; for1<=i<=N, rowiof the matrix was interchanged with rowIPIV(i). Iconic row-shuffling behavior.BβREALarray, dimension(LDB,NRHS). The right hand side matrixB. Itβs giving βwhat weβre solving forβ energy.LDBβINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).XβREALarray, dimension(LDX,NRHS). On entry, the solution matrixX, as computed bySGETRS. On exit, the improved solution matrixX. Glow-up arc, honestly. β¨LDXβINTEGER. The leading dimension of the arrayX.LDX >= max(1,N).FERRβREALarray, dimension(NRHS). The estimated forward error bound for each solution vectorX(j)(thej-th column of the solution matrixX). IfXTRUEis 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. So itβs a little extra, not a lie. πBERRβREALarray, dimension(NRHS). The componentwise relative backward error of each solution vectorX(j)(i.e., the smallest relative change in any element ofAorBthat makesX(j)an exact solution). Tiny changes, big meaning. πWORKβREALarray, dimension(3*N). Scratch space. Do not perceive it.IWORKβINTEGERarray, dimension(N). More scratch, but integer-flavored.INFOβINTEGER. Exit tea:= 0:successful exit;< 0:ifINFO = -i, thei-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 matrixA.N >= 0.NRHSβINTEGER. The number of right hand sides, i.e., the number of columns of the matricesBandX.NRHS >= 0.AβCOMPLEX*16array, dimension(LDA,N). The originalN-by-NmatrixA.LDAβINTEGER. The leading dimension of the arrayA.LDA >= max(1,N).AFβCOMPLEX*16array, dimension(LDAF,N). The factorsLandUfrom the factorizationA = P*L*Uas computed byZGETRF.LDAFβINTEGER. The leading dimension of the arrayAF.LDAF >= max(1,N).IPIVβINTEGERarray, dimension(N). The pivot indices fromZGETRF; for1<=i<=N, rowiof the matrix was interchanged with rowIPIV(i).BβCOMPLEX*16array, dimension(LDB,NRHS). The right hand side matrixB.LDBβINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).XβCOMPLEX*16array, dimension(LDX,NRHS). On entry, the solution matrixX, as computed byZGETRS. On exit, the improved solution matrixX.LDXβINTEGER. The leading dimension of the arrayX.LDX >= max(1,N).FERRβDOUBLE PRECISIONarray, dimension(NRHS). The estimated forward error bound for each solution vectorX(j)(thej-th column of the solution matrixX). IfXTRUEis 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.BERRβDOUBLE PRECISIONarray, dimension(NRHS). The componentwise relative backward error of each solution vectorX(j)(i.e., the smallest relative change in any element ofAorBthat makesX(j)an exact solution).WORKβCOMPLEX*16array, dimension(2*N).RWORKβDOUBLE PRECISIONarray, dimension(N).INFOβINTEGER.= 0:successful exit;< 0:ifINFO = -i, thei-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
- arch rolling: lapack-doc 3.12.1-2 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms