CPPRFS(3)
πΈ CPPRFS(3) β like, the whole entire cpprfs.f situation π
okay bestie, so this page lives at /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/cpprfs.f and it's part of the LAPACK library functions manual. it's a Fortran thing. it's giving β¨linear algebraβ¨. stay with me, i promise it slaps.
β¨ SYNOPSIS β¨
π«Ά Functions/Subroutines
the main character herself:
subroutine CPPRFS (uplo, n, nrhs, ap, afp, b, ldb, x, ldx, ferr, berr,
work, rwork, info)
and yes, that's CPPRFS β say it with your chest.
π Function/Subroutine Documentation π
here's the full signature, every last character of it, no cap:
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 π«
π Purpose:
so what does she do? literally this:
!>
!> CPPRFS 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.
!>
translation: you already have a solution, she makes it better, and then she tells you how wrong you possibly still are. icon behaviour. π
π Parameters π
every single one, in order, no skips:
UPLOβ isCHARACTER*1. which triangle of A are we even talking about?
!> UPLO is CHARACTER*1
!> = 'U': Upper triangle of A is stored;
!> = 'L': Lower triangle of A is stored.
!>
Nβ isINTEGER. the order of the matrix A. and it's gotta beN >= 0.
!> N is INTEGER
!> The order of the matrix A. N >= 0.
!>
NRHSβ isINTEGER. the number of right hand sides, aka the number of columns of the matrices B and X.NRHS >= 0. yes bestie, plural right hand sides, she's versatile π
!> NRHS is INTEGER
!> The number of right hand sides, i.e., the number of columns
!> of the matrices B and X. NRHS >= 0.
!>
APβ isCOMPLEXarray, dimension(N*(N+1)/2). the upper or lower triangle of the Hermitian matrix A, packed columnwise in a linear array. the j-th column of A goes into AP like this:
!> AP is COMPLEX array, dimension (N*(N+1)/2)
!> 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 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.
!>
lowkey those index formulas are a whole vibe. memorize them or don't, but they're there. π
AFPβ isCOMPLEXarray, dimension(N*(N+1)/2). it's 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).
!> AFP is COMPLEX array, dimension (N*(N+1)/2)
!> The triangular factor U or L from the Cholesky factorization
!> A = U**H*U or A = L*L**H, as computed by SPPTRF/CPPTRF,
!> packed columnwise in a linear array in the same format as A
!> (see AP).
!>
Bβ isCOMPLEXarray, dimension(LDB,NRHS). it's the right hand side matrix B. that's it, that's her.
!> B is COMPLEX array, dimension (LDB,NRHS)
!> The right hand side matrix B.
!>
LDBβ isINTEGER. the leading dimension of the array B.LDB >= max(1,N). respect the bounds fr fr.
!> LDB is INTEGER
!> The leading dimension of the array B. LDB >= max(1,N).
!>
Xβ isCOMPLEXarray, dimension(LDX,NRHS). on entry, it's the solution matrix X, as computed byCPPTRS. on exit, it's the improved solution matrix X. she went in mid and came out iconic, we love a glow-up π¦
!> X is COMPLEX array, dimension (LDX,NRHS)
!> On entry, the solution matrix X, as computed by CPPTRS.
!> On exit, the improved solution matrix X.
!>
LDXβ isINTEGER. the leading dimension of the array X.LDX >= max(1,N).
!> LDX is INTEGER
!> The leading dimension of the array X. LDX >= max(1,N).
!>
FERRβ isREALarray, 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 honest, but she's a little dramatic about it π
!> 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.
!>
BERRβ isREALarray, 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). tiny changes, big consequences, we stan π«Ά
!> 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β isCOMPLEXarray, dimension(2*N). scratch space. the little backstage area. β¨
!> WORK is COMPLEX array, dimension (2*N)
!>
RWORKβ isREALarray, dimension(N). more scratch space, but make it real.
!> RWORK is REAL array, dimension (N)
!>
INFOβ isINTEGER. the vibe check of the whole call:
!> INFO is INTEGER
!> = 0: successful exit
!> < 0: if INFO = -i, the i-th argument had an illegal value
!>
so 0 means you ate π
and anything negative means some argument misbehaved and she's telling you exactly which one.
β Internal Parameters β
just one, and it's doing the most:
!> ITMAX is the maximum number of steps of iterative refinement.
!>
that's her budget, bestie. iterative refinement only gets so many tries. π
π Author π
shoutout to the whole squad:
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 169 of file cpprfs.f. (yes, line one-six-nine. iconic number, no notes. π)
πΈ Author πΈ
this page was generated automatically by Doxygen for LAPACK from the source code. so nobody wrote this for you, a robot did, and honestly? she understood the assignment. π§
ngl if you skipped the packed-storage index formulas in AP, go back. they will find you. π₯
okay that's the whole page, mwah, ily, go fix some linear systems π
LAPACK β Version 3.12.0 β this whole fairy godmother moment was brought to you by /home/abui...RC/cpprfs.f(3), see you in the group chat ππ¦
π¦ where this page comes from
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms