CPOT02(3)
π
CPOT02 β like, the residual checker for Hermitian systems (yes bestie, cpot02.f(3), Library Functions Manual, we're in the Fortran section of the filesystem and it's iconic)
Okay so picture this: you're deep in /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/TESTING/LIN/cpot02.f β yes that's the whole path, she's got a long address, main character energy β and this little test routine is literally the vibe check for your Hermitian solves. π
β¨ SYNOPSIS β¨
Functions/Subroutines
subroutine CPOT02 (uplo, n, nrhs, a, lda, x, ldx, b, ldb, rwork, resid)
CPOT02
π¦ Function/Subroutine Documentation π¦
subroutine CPOT02 (character uplo, integer n, integer nrhs, complex,
dimension( lda, * ) a, integer lda, complex, dimension( ldx, * ) x,
integer ldx, complex, dimension( ldb, * ) b, integer ldb, real,
dimension( * ) rwork, real resid)
CPOT02
πΈ Purpose πΈ
!>
!> CPOT02 computes the residual for the solution of a Hermitian system
!> of linear equations A*x = b:
!>
!> RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
!>
!> where EPS is the machine epsilon.
!>
So basically she takes your fancy Hermitian linear system A*x = b, looks at the answer you computed, and goes "hmm, let me check that" β and the number she hands back is RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ), where EPS is the machine epsilon. Small residual = slay, big residual = π. No cap.
π«Ά Parameters π«Ά
UPLOβUPLO is CHARACTER*1, and she's here to tell us which triangle of the Hermitian matrixAwe actually bothered to store:= 'U': Upper triangular,= 'L': Lower triangular. Pick one bestie, not both. πNβN is INTEGER, the number of rows and columns of the matrixA. Constraint:N >= 0.NRHSβNRHS is INTEGER, the number of columns ofB, i.e. how many right hand sides we're juggling π. Constraint:NRHS >= 0.AβA is COMPLEX array, dimension (LDA,N)β the original Hermitian matrixAitself, undisputed queen of the whole operation. πLDAβLDA is INTEGER, the leading dimension of the arrayA. Constraint:LDA >= max(1,N).XβX is COMPLEX array, dimension (LDX,NRHS)β the computed solution vectors for the system of linear equations. This is your work, be proud of it. βLDXβLDX is INTEGER, the leading dimension of the arrayX. Constraint:LDX >= max(1,N). (Yes there's that extra space in the original before the description β we respect her formatting choices. π)BβB is COMPLEX array, dimension (LDB,NRHS). Careful, this one changes on you π¨: on entry it's the right hand side vectors for the system of linear equations, and on exitBis overwritten with the differenceB - A*X. She ate, and she left the evidence behind.LDBβLDB is INTEGER, the leading dimension of the arrayB. Constraint:LDB >= max(1,N).RWORKβRWORK is REAL array, dimension (N)β scratch space, the little backstage crew. π§RESIDβRESID is REAL, the maximum over the number of right hand sides ofnorm(B - A*X) / ( norm(A) * norm(X) * EPS ). That's the final score, the numeric verdict. π₯
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π Definition π
Definition at line 125 of file cpot02.f.
β Author β
Generated automatically by Doxygen for LAPACK from the source code.
Heads up bestie: this page wasn't hand-written by a human with a cute notebook β Doxygen generated it straight from the source, so the source is always the real one. π«‘
Anyways, that's the whole page β every parameter, every constraint, every overwrite, all present and accounted for, periodt. β¨
Sign-off time: this is LAPACK, Version 3.12.0, and the foot of the page points back at /home/abui...IN/cpot02.f(3). Love that for us. π mwah π
π¦ 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