TESTING/LIN/spot02.f(3)
π TESTING/LIN/spot02.f(3) β the spot02 era
ok so bestie, welcome to the manual page for TESTING/LIN/spot02.f(3), aka the LAPACK library functions manual entry for a lil testing subroutine that has ONE job and does it gorgeously. come sit, i'll walk you through it π
β¨ NAME β¨
TESTING/LIN/spot02.f β like, literally that. that's the name. it's the file, it's the vibe, it's giving "i live in the TESTING/LIN directory and i'm proud" π
β¨ SYNOPSIS β¨
Functions/Subroutines
subroutine spot02 (uplo, n, nrhs, a, lda, x, ldx, b, ldb, rwork, resid)β SPOT02. yes she's asubroutine, yes she takes eleven arguments, yes she ate π₯
β¨ Function/Subroutine Documentation β¨
subroutine spot02 (character uplo, integer n, integer nrhs, real, dimension( lda, * ) a, integer lda, real, dimension( ldx, * ) x, integer ldx, real, dimension( ldb, * ) b, integer ldb, real, dimension( * ) rwork, real resid)
SPOT02 π«Ά (the full signature in all its character/integer/real glory, dimension( lda, * ), dimension( ldx, * ), dimension( ldb, * ), dimension( * ) and all β no cap, that's the whole thing)
π¦ Purpose π¦
!>!> SPOT02 computes the residual for the solution of a symmetric 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 computes the residual for solving a symmetric system of linear equations A*x = b, and the formula is literally:
RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS )
where EPS is the machine epsilon, obviously π
it's giving "how wrong is my answer, scaled so the number actually means something" and honestly? iconic.
π Parameters π
UPLOβ ok soUPLOisCHARACTER*1and it tells us whether the upper or lower triangular part of the symmetric matrixAis the one being stored:= 'U': Upper triangular= 'L': Lower triangular
NβNisINTEGER, and it's the number of rows and columns of the matrixA. constraint era:N >= 0. πNRHSβNRHSisINTEGER, the number of columns ofB, the matrix of right hand sides. also constrained:NRHS >= 0. β¨AβAisREAL array, dimension (LDA,N)β and it's the original symmetric matrixA. the main character, lowkey πLDAβLDAisINTEGER, the leading dimension of the arrayA. rule of the land:LDA >= max(1,N)π§XβXisREAL array, dimension (LDX,NRHS)β the computed solution vectors for the system of linear equations. bestie did her math and here's the receipts πLDXβLDXisINTEGER, the leading dimension of the arrayX. requirement:LDX >= max(1,N). note the double space in the original, we love a careless space πΈBβBisREAL array, dimension (LDB,NRHS). on entry, it's the right hand side vectors for the system of linear equations. on exit,Bis overwritten with the differenceB - A*X. β οΈ girly gets DESTROYED β she comes in as the RHS and leaves as the difference. know that before you hand her over πLDBβLDBisINTEGER, the leading dimension of the arrayB. requirement:LDB >= max(1,N)πRWORKβRWORKisREAL array, dimension (N). that's it. that's the whole description. she's a workspace and she's mysterious πRESIDβRESIDisREAL, and it's the maximum over the number of right hand sides of:
norm(B - A*X) / ( norm(A) * norm(X) * EPS )
so like, the worst-case residual across all your right hand sides. the final score. the vibe check result β
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
a whole committee of legends, fr fr π«Ά
Definition at line 125 of file spot02.f. π
π Author π
Generated automatically by Doxygen for LAPACK from the source code. (so nobody wrote this prose, a robot did, and honestly? she tried her best π)
ok that's the whole page bestie, no details left behind, periodt. this came to you straight from TESTING/LIN/spot02.f(3) in LAPACK Version 3.12.0 β go forth and check those residuals, and remember: B gets overwritten, so don't come crying to me ππβ¨
π¦ 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