TESTING/LIN/cget03.f(3)

πŸ“¦
version 3.12.1 Β· 2 versions
, in arch rolling

πŸ’… 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: RESID and RCOND are both REAL and the residual formula divides by EPS, 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