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. IfUPLO = '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). IfUPLO = '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 factorizationA = U**H*UorA = L*L**H, as computed byCPOTRF. 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 byCPOTRS. 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 vectorX(j)(the j-th column of the solution matrix X). 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). That estimate is as reliable as the estimate forRCOND, 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 vectorX(j)(i.e., the smallest relative change in any element of A or B that makesX(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: ifINFO = -i, the i-th argument had an illegal value. So like, somebody typed something cursed into slot i.
Internal Parameters
ITMAXis 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. IfUPLO = '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. IfUPLO = '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 factorizationA = U**T*UorA = L*L**T, as computed byDPOTRF. Note the**Tbestie β 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 byDPOTRS. 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 vectorX(j)(the j-th column of the solution matrix X). 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βBERR is DOUBLE PRECISION array, dimension (NRHS). The componentwise relative backward error of each solution vectorX(j)(i.e., the smallest relative change in any element of A or B that makesX(j)an exact solution).WORKβWORK is DOUBLE PRECISION array, dimension (3*N). Note:3*Nhere, not2*Nβ she's a whole extra N of scratch space. Highkey generous.IWORKβIWORK is INTEGER array, dimension (N). Integer scratch space (yep,IWORK, noRWORKin 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: ifINFO = -i, the i-th argument had an illegal value
Internal Parameters
ITMAXis 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 soAis aREALarray, dimension(LDA,N). It's the symmetric matrixA. IfUPLO = 'U', the leadingN-by-Nupper triangular part ofAcontains the upper triangular part of the matrixA, and the strictly lower triangular part ofAis not referenced. IfUPLO = 'L', the leadingN-by-Nlower triangular part ofAcontains the lower triangular part of the matrixA, and the strictly upper triangular part ofAis not referenced. πLDAβLDAisINTEGER. It's the leading dimension of the arrayA, and the rule isLDA >= max(1,N). no cap. β¨AFβAFis aREALarray, dimension(LDAF,N). It holds the triangular factorUorLfrom the Cholesky factorizationA = U**T*UorA = L*L**T, as computed bySPOTRF. iconic. πLDAFβLDAFisINTEGER. It's the leading dimension of the arrayAF, andLDAF >= max(1,N). π¦BβBis aREALarray, dimension(LDB,NRHS). It's the right hand side matrixB. periodt. πΈLDBβLDBisINTEGER. It's the leading dimension of the arrayB, andLDB >= max(1,N). πXβXis aREALarray, dimension(LDX,NRHS). On entry, it's the solution matrixX, as computed bySPOTRS. On exit, it's the improved solution matrixX. glow-up fr fr. β¨LDXβLDXisINTEGER. It's the leading dimension of the arrayX, andLDX >= max(1,N). π«ΆFERRβFERRis aREALarray, dimension(NRHS). It's the estimated forward error bound for each solution vectorX(j)β that's 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. bestie, it's giving cautious but useful. πBERRβBERRis aREALarray, dimension(NRHS). It's 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βWORKis aREALarray, dimension(3*N). it's the workspace, don't question it. π§IWORKβIWORKis anINTEGERarray, dimension(N). integer workspace vibes. πINFOβINFOisINTEGER, and here's the status tea:= 0: successful exit π< 0: ifINFO = -i, thei-th argument had an illegal value π
β¨ Internal Parameters
ITMAXis 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βUPLOisCHARACTER*1, and it's giving triangle choice:= 'U': Upper triangle ofAis stored;= 'L': Lower triangle ofAis stored. π¦
NβNisINTEGER. It's the order of the matrixA, andN >= 0. πΈNRHSβNRHSisINTEGER. It's the number of right hand sides, i.e., the number of columns of the matricesBandX.NRHS >= 0. πAβAis aCOMPLEX*16array, dimension(LDA,N). It's the Hermitian matrixA. IfUPLO = 'U', the leadingN-by-Nupper triangular part ofAcontains the upper triangular part of the matrixA, and the strictly lower triangular part ofAis not referenced. IfUPLO = 'L', the leadingN-by-Nlower triangular part ofAcontains the lower triangular part of the matrixA, and the strictly upper triangular part ofAis not referenced. β¨LDAβLDAisINTEGER. It's the leading dimension of the arrayA, andLDA >= max(1,N). π«ΆAFβAFis aCOMPLEX*16array, dimension(LDAF,N). It holds the triangular factorUorLfrom the Cholesky factorizationA = U**H*UorA = L*L**H, as computed byZPOTRF. πLDAFβLDAFisINTEGER. It's the leading dimension of the arrayAF, andLDAF >= max(1,N). πBβBis aCOMPLEX*16array, dimension(LDB,NRHS). It's the right hand side matrixB. πLDBβLDBisINTEGER. It's the leading dimension of the arrayB, andLDB >= max(1,N). βXβXis aCOMPLEX*16array, dimension(LDX,NRHS). On entry, it's the solution matrixX, as computed byZPOTRS. On exit, it's the improved solution matrixX. main character energy. πLDXβLDXisINTEGER. It's the leading dimension of the arrayX, andLDX >= max(1,N). π¦FERRβFERRis aDOUBLE PRECISIONarray, dimension(NRHS). It's 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βBERRis aDOUBLE PRECISIONarray, dimension(NRHS). It's 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βWORKis aCOMPLEX*16array, dimension(2*N). workspace but make it complex. πRWORKβRWORKis aDOUBLE PRECISIONarray, dimension(N). real workspace doing real work. π«ΆINFOβINFOisINTEGER, and the status tea is:= 0: successful exit π< 0: ifINFO = -i, thei-th argument had an illegal value π
β¨ Internal Parameters
ITMAXis 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
- 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