TESTING/LIN/cget03.f(3)
π TESTING/LIN/cget03.f(3)
okay so this is a page out of the Library Functions Manual for TESTING/LIN/cget03.f and bestie, it's giving "LAPACK test routine that checks whether your matrix inverse is actually slaying or lowkey flopping" β¨
πΈ NAME πΈ
TESTING/LIN/cget03.f β no cap, that's the whole name, that's the file π«Ά
β¨ SYNOPSIS β¨
Functions/Subroutines
subroutine cget03 (n, a, lda, ainv, ldainv, work, ldwork, rwork, rcond, resid)β the one and only, she's the main character πCGET03
π Function/Subroutine Documentation π
subroutine cget03 β the full glow-up signature, verbatim, don't @ me:
subroutine cget03 (integer n, complex, dimension( lda, * ) a, integer lda,
complex, dimension( ldainv, * ) ainv, integer ldainv, complex,
dimension( ldwork, * ) work, integer ldwork, real, dimension( * ) rwork,
real rcond, real resid)
CGET03 π¦
π Purpose π
ok so here's the vibe: CGET03 computes the residual for a general matrix times its inverse. Literally the receipts on your inversion, fr fr:
!> CGET03 computes the residual for a general matrix times its inverse:
!> norm( I - AINV*A ) / ( N * norm(A) * norm(AINV) * EPS ),
!> where EPS is the machine epsilon.
where EPS is the machine epsilon β yes queen, the tiny one πΈ
π Parameters π
N
!> N is INTEGER
!> The number of rows and columns of the matrix A. N >= 0.
so like, rows AND columns, she's square, and N >= 0 obviously π
A
!> A is COMPLEX array, dimension (LDA,N)
!> The original N x N matrix A.
the OG matrix, the before picture πΈ
LDA
!> LDA is INTEGER
!> The leading dimension of the array A. LDA >= max(1,N).
leading dimension of A, and LDA >= max(1,N) β rules are rules π
AINV
!> AINV is COMPLEX array, dimension (LDAINV,N)
!> The inverse of the matrix A.
the after picture, aka A's inverse π¦
LDAINV
!> LDAINV is INTEGER
!> The leading dimension of the array AINV. LDAINV >= max(1,N).
leading dimension of AINV and yes LDAINV >= max(1,N), same energy β¨
WORK
!> WORK is COMPLEX array, dimension (LDWORK,N)
it's the workspace bestie, she's just out here helping π
LDWORK
!> LDWORK is INTEGER
!> The leading dimension of the array WORK. LDWORK >= max(1,N).
leading dimension of WORK, LDWORK >= max(1,N), consistent icon behavior π
RWORK
!> RWORK is REAL array, dimension (N)
the REAL one, dimension (N) β not like the others, she's REAL and that's iconic πΈ
RCOND
!> RCOND is REAL
!> The reciprocal of the condition number of A, computed as
!> ( 1/norm(A) ) / norm(AINV).
the reciprocal of the condition number of A, computed as ( 1/norm(A) ) / norm(AINV). write that down π
RESID
!> RESID is REAL
!> norm(I - AINV*A) / ( N * norm(A) * norm(AINV) * EPS )
the residual itself, the whole point, the moment π₯
π Author π
these absolute legends:
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
β Definition β
Definition at line 108 of file cget03.f β yes, line 108, don't forget it π«Ά
π Author π
Generated automatically by Doxygen for LAPACK from the source code. (so nobody hand-wrote this, the robot did it, and honestly? she ate π€β¨)
heads up bestie:RESIDandRCONDare bothREALand the residual formula divides byEPS, so this is very much "let the numbers speak" territory β no vibes-based math here, periodt π
ok bye ily, this page came from LAPACK, Version 3.12.0 and is dated TESTING/LIN/cget03.f(3) β go compute that residual and slay πππ
π¦ 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