pprfs(3)
π pprfs(3) π
okay so welcome to pprfs(3) from the Library Functions Manual β this is the iterative-refinement girlie squad and honestly they are so underrated. four subroutines, one job: take your janky computed solution and make it better β¨
π NAME π
pprfs β pprfs: iterative refinement. that's it, that's the name, she's literally named after the vibe π
πΈ SYNOPSIS πΈ
π¦ Functions π¦
cpprfsβ the complex one, withrwork:
subroutine cpprfs (uplo, n, nrhs, ap, afp, b, ldb, x, ldx, ferr, berr,
work, rwork, info)
its description line is just CPPRFS (iconic, minimal).
dpprfsβ the double-precision one, withiwork:
subroutine dpprfs (uplo, n, nrhs, ap, afp, b, ldb, x, ldx, ferr, berr,
work, iwork, info)
description line: DPPRFS.
spprfsβ the single-precision one, alsoiwork:
subroutine spprfs (uplo, n, nrhs, ap, afp, b, ldb, x, ldx, ferr, berr,
work, iwork, info)
description line: SPPRFS.
zpprfsβ the double-complex one, back torwork:
subroutine zpprfs (uplo, n, nrhs, ap, afp, b, ldb, x, ldx, ferr, berr,
work, rwork, info)
description line: ZPPRFS.
β Detailed Description β
no cap, the "detailed description" section is just a header β the actual tea is all filed under Function Documentation, bestie. scroll with me π«Ά
π Function Documentation π
π subroutine cpprfs π
subroutine cpprfs (character uplo, integer n, integer nrhs,
complex, dimension( * ) ap, complex, dimension( * ) afp,
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)
CPPRFS β say hi π
π Purpose π
CPPRFS improves the computed solution to a system of linear equations when the coefficient matrix is Hermitian positive definite and packed, and it also provides error bounds plus backward error estimates for that solution. so like β you already solved it, now she's gonna glow it up and tell you how wrong you still are π (lovingly)
π Parameters π
UPLOβUPLO is CHARACTER*1.= 'U': the upper triangle of A is stored;= 'L': the lower triangle of A is stored. pick a side, bestie, you can't have both πNβN is INTEGER, the order of the matrix A.N >= 0.NRHSβNRHS is INTEGER, the number of right hand sides, i.e., the number of columns of the matrices B and X.NRHS >= 0.APβAP is COMPLEX 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)*(2n-j)/2) = A(i,j) for j<=i<=n.
AFPβAFP is COMPLEX array, dimension (N*(N+1)/2). the triangular factor U or L from the Cholesky factorizationA = U**H*UorA = L*L**H, as computed bySPPTRF/CPPTRF, packed columnwise in a linear array in the same format as A (seeAP). yes she saidSPPTRF/CPPTRF, that's the original text, don't come for me π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.LDB >= max(1,N).XβX is COMPLEX array, dimension (LDX,NRHS). on entry, the solution matrix X, as computed byCPPTRS. on exit, the improved solution matrix X π₯ that's the whole point, we love a glow-up arc.LDXβLDX is INTEGER, the leading dimension of the array X.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), 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 she's a li'l dramatic, but trustworthy π«Ά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).WORKβWORK is COMPLEX array, dimension (2*N).RWORKβRWORK is REAL array, dimension (N).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. (that's the loop count, she's not gonna refine forever, she has a life)
π§ Author π§
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 169 of file cpprfs.f.
π subroutine dpprfs π
subroutine dpprfs (character uplo, integer n, integer nrhs,
double precision, dimension( * ) ap,
double precision, dimension( * ) afp,
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)
DPPRFS β the double-precision twin π«
π Purpose π
DPPRFS improves the computed solution to a system of linear equations when the coefficient matrix is symmetric positive definite and packed, and provides error bounds and backward error estimates for the solution. same energy, different precision β¨
π Parameters π
UPLOβUPLO is CHARACTER*1.= 'U': the upper triangle of A is stored;= 'L': the lower triangle of A is stored.NβN is INTEGER, the order of the matrix A.N >= 0.NRHSβNRHS is INTEGER, the number of right hand sides, i.e., the number of columns of the matrices B and X.NRHS >= 0.APβAP is DOUBLE PRECISION array, dimension (N*(N+1)/2). the upper or lower triangle of the symmetric matrix A, packed columnwise in a linear array. the j-th column of A lives in the array AP like so:
if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
AFPβAFP is DOUBLE PRECISION array, dimension (N*(N+1)/2). the triangular factor U or L from the Cholesky factorizationA = U**T*UorA = L*L**T, as computed byDPPTRF/ZPPTRF, packed columnwise in a linear array in the same format as A (seeAP). (yes,DPPTRF/ZPPTRF, that's what it says, i don't make the rules π)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.LDB >= max(1,N).XβX is DOUBLE PRECISION array, dimension (LDX,NRHS). on entry, the solution matrix X, as computed byDPPTRS. on exit, the improved solution matrix X π₯LDXβLDX is INTEGER, the leading dimension of the array X.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). (three times N, not two β she's built different π )IWORKβIWORK is INTEGER array, dimension (N).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 at line 169 of file dpprfs.f.
π subroutine spprfs π
subroutine spprfs (character uplo, integer n, integer nrhs,
real, dimension( * ) ap, real, dimension( * ) afp,
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)
SPPRFS β single precision, same attitude πΈ
π Purpose π
SPPRFS improves the computed solution to a system of linear equations when the coefficient matrix is symmetric positive definite and packed, and provides error bounds and backward error estimates for the solution. (yes, she's DPPRFS's single-precision sister, they share a closet π―)
π Parameters π
UPLOβUPLO is CHARACTER*1.= 'U': the upper triangle of A is stored;= 'L': the lower triangle of A is stored.NβN is INTEGER, the order of the matrix A.N >= 0.NRHSβNRHS is INTEGER, the number of right hand sides, i.e., the number of columns of the matrices B and X.NRHS >= 0.APβAP is REAL array, dimension (N*(N+1)/2). the upper or lower triangle of the symmetric matrix A, packed columnwise in a linear array. the j-th column of A is stored in the array AP as follows:
if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
AFPβAFP is REAL array, dimension (N*(N+1)/2). the triangular factor U or L from the Cholesky factorizationA = U**T*UorA = L*L**T, as computed bySPPTRF/CPPTRF, packed columnwise in a linear array in the same format as A (seeAP).Bβ and bestieβ¦ this is exactly where the page cuts off π part 2 has the rest ofspprfs, plus all ofzpprfsβ don't move πBβBis aREALarray, dimension(LDB,NRHS). Itβs the right hand side matrixB. πLDBβLDBisINTEGER. Itβs the leading dimension of the arrayB.LDB >= max(1,N). Respect the leading dimension, bestie, itβs not decorative. β¨XβXis aREALarray, dimension(LDX,NRHS). On entry, itβs the solution matrixX, as computed bySPPTRS. On exit, itβs the improved solution matrixX. glow-up arc, literally. πLDXβLDXisINTEGER. Itβs the leading dimension of the arrayX.LDX >= max(1,N). πFERRβFERRis aREALarray, dimension(NRHS). Itβs 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β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). πΈIWORKβIWORKis anINTEGERarray, dimension(N). πINFOβINFOisINTEGER.= 0: successful exit.< 0: ifINFO = -i, the i-th argument had an illegal value. π
π₯ Internal Parameters
ITMAXβITMAXis 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 169 of file spprfs.f. π
π§ subroutine zpprfs
subroutine zpprfs (character uplo, integer n, integer nrhs, complex*16,
dimension( * ) ap, complex*16, dimension( * ) afp, 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)
π ZPPRFS π
πΈ Purpose πΈ
ZPPRFS improves the computed solution to a system of linear equations when the coefficient matrix is Hermitian positive definite and packed, and provides error bounds and backward error estimates for the solution. no cap, thatβs the whole serve. π
β¨ Parameters β¨
UPLOβUPLOisCHARACTER*1.= 'U': Upper triangle ofAis stored;= 'L': Lower triangle ofAis stored. pick your triangle, bestie. πNβNisINTEGER. The order of the matrixA.N >= 0. πNRHSβNRHSisINTEGER. The number of right hand sides, i.e., the number of columns of the matricesBandX.NRHS >= 0. πAPβAPis aCOMPLEX*16array, dimension(N*(N+1)/2). Itβs the upper or lower triangle of the Hermitian matrixA, packed columnwise in a linear array. The j-th column ofAis stored in the arrayAPas follows: ifUPLO = 'U',AP(i + (j-1)*j/2) = A(i,j)for1<=i<=j; ifUPLO = 'L',AP(i + (j-1)*(2n-j)/2) = A(i,j)forj<=i<=n. packed and serving, iykyk. π¦AFPβAFPis aCOMPLEX*16array, dimension(N*(N+1)/2). Itβs the triangular factorUorLfrom the Cholesky factorizationA = U**H*UorA = L*L**H, as computed byDPPTRF/ZPPTRF, packed columnwise in a linear array in the same format asA(seeAP). πBβBis aCOMPLEX*16array, dimension(LDB,NRHS). Itβs the right hand side matrixB. πLDBβLDBisINTEGER. Itβs the leading dimension of the arrayB.LDB >= max(1,N). β¨XβXis aCOMPLEX*16array, dimension(LDX,NRHS). On entry, itβs the solution matrixX, as computed byZPPTRS. On exit, itβs the improved solution matrixX. main character energy: enters as a solution, exits improved. πLDXβLDXisINTEGER. Itβs the leading dimension of the arrayX.LDX >= max(1,N). πFERRβFERRis aDOUBLE PRECISIONarray, dimension(NRHS). Itβs 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β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). πRWORKβRWORKis aDOUBLE PRECISIONarray, dimension(N). βINFOβINFOisINTEGER.= 0: successful exit.< 0: ifINFO = -i, the i-th argument had an illegal value. π
π₯ Internal Parameters
ITMAXβITMAXis 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 169 of file zpprfs.f. π
π Author (page metadata)
Generated automatically by Doxygen for LAPACK from the source code. π«Ά
π
Source/version check, bestie: this footer is giving LAPACK Version 3.12.0 and page pprfs(3). No date in this footer β just version, page, and vibes. π
π¦ 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