TESTING/LIN/sget02.f(3)

๐Ÿ“ฆ
version 3.12.1 ยท 2 versions
, in arch rolling

๐Ÿงฎ TESTING/LIN/sget02.f(3)

okay bestie, welcome to the Library Functions Manual page for TESTING/LIN/sget02.f โ€” yes that's the whole page title, no cap. Buckle up, this one's a little linear-algebra baddie ๐Ÿ’…


โœจ NAME โœจ

TESTING/LIN/sget02.f โ€” the file, the icon, the legend ๐ŸŽ€


๐ŸŒธ SYNOPSIS ๐ŸŒธ

Functions/Subroutines

subroutine sget02 (trans, m, n, nrhs, a, lda, x, ldx, b, ldb, rwork,
    resid)

SGET02 โ€” that's literally the name, she's giving main character energy ๐Ÿ‘‘


๐Ÿฆ‹ Function/Subroutine Documentation ๐Ÿฆ‹

subroutine sget02 (character trans, integer m, 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)

SGET02 โ€” here she is again, slaying ๐Ÿซถ

๐ŸŽฏ Purpose

!>
!> SGET02 computes the residual for a solution of a system of linear
!> equations op(A)*X = B:
!>    RESID = norm(B - op(A)*X) / ( norm(op(A)) * norm(X) * EPS ),
!> where op(A) = A or A**T, depending on TRANS, and EPS is the
!> machine epsilon.
!> The norm used is the 1-norm.
!>

so like โ€” she takes your supposed solution X, plugs it back in, and checks how far off B you ended up. classic vibe check on your math ๐Ÿ”ฅ And the norm she uses? The 1-norm, periodt.


๐Ÿ‘‘ Parameters ๐Ÿ‘‘

TRANS

!>          TRANS is CHARACTER*1
!>          Specifies the form of the system of equations:
!>          = 'N':  A    * X = B  (No transpose)
!>          = 'T':  A**T * X = B  (Transpose)
!>          = 'C':  A**H * X = B  (Conjugate transpose = Transpose)
!>

the character flag that tells everyone which flavour of A we're working with. pick your fighter ๐ŸŒˆ

M

!>          M is INTEGER
!>          The number of rows of the matrix A.  M >= 0.
!>

how many rows A has. and M >= 0 okay, no negative row drama ๐Ÿ™ˆ

N

!>          N is INTEGER
!>          The number of columns of the matrix A.  N >= 0.
!>

how many columns A has. N >= 0 again โ€” keep it legal, bestie โœจ

NRHS

!>          NRHS is INTEGER
!>          The number of columns of B, the matrix of right hand sides.
!>          NRHS >= 0.
!>

how many right-hand-side columns B has. NRHS >= 0, obviously, we don't do negative here ๐Ÿ’€

A

!>          A is REAL array, dimension (LDA,N)
!>          The original M x N matrix A.
!>

the original M x N matrix A herself. the moment. the icon ๐Ÿ’–

LDA

!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,M).
!>

leading dimension of A, and it's gotta satisfy LDA >= max(1,M). no shortcuts ๐ŸŽ€

X

!>          X is REAL array, dimension (LDX,NRHS)
!>          The computed solution vectors for the system of linear
!>          equations.
!>

your computed solution vectors โ€” the ones we're lowkey judging ๐Ÿ‘€

LDX

!>          LDX is INTEGER
!>          The leading dimension of the array X.  If TRANS = 'N',
!>          LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
!>

leading dimension of X. conditional rules, because of course: TRANS = 'N' means LDX >= max(1,N); TRANS = 'T' or 'C' means LDX >= max(1,M) ๐Ÿงš

B

!>          B is REAL array, dimension (LDB,NRHS)
!>          On entry, the right hand side vectors for the system of
!>          linear equations.
!>          On exit, B is overwritten with the difference B - op(A)*X.
!>

on entry, these are your right hand side vectors. on exit, B gets overwritten with the difference B - op(A)*X โ€” she does not leave things how she found them, sorry not sorry ๐Ÿ˜ญ

LDB

!>          LDB is INTEGER
!>          The leading dimension of the array B.  IF TRANS = 'N',
!>          LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
!>

leading dimension of B. note the caps-lock IF in the original, she's yelling a little. TRANS = 'N' โ†’ LDB >= max(1,M); TRANS = 'T' or 'C' โ†’ LDB >= max(1,N) ๐Ÿ’œ

RWORK

!>          RWORK is REAL array, dimension (M)
!>

scratch workspace, REAL, dimension (M). literally just vibes storage ๐ŸŒธ

RESID

!>          RESID is REAL
!>          The maximum over the number of right hand sides of
!>          norm(B - op(A)*X) / ( norm(op(A)) * norm(X) * EPS ).
!>

the final verdict, bestie โ€” the maximum over the number of right hand sides of norm(B - op(A)*X) / ( norm(op(A)) * norm(X) * EPS ). tiny number = ate. big number = ๐Ÿ’€


๐ŸŒŸ Author ๐ŸŒŸ

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

the whole squad showed up for this one ๐Ÿซถ

Definition at line 133 of file sget02.f.


โญ Author (the second one, yes really) โญ

Generated automatically by Doxygen for LAPACK from the source code. she was built by a machine, and honestly? she's thriving ๐Ÿค–โœจ


fun little reminder: this page is auto-generated, so don't come for the formatting โ€” come for the math ๐Ÿ’…

and that's the whole page, bestie! brought to you by LAPACK, Version 3.12.0, living at TESTING/LIN/sget02.f(3) โ€” that footer energy, but make it cute ๐ŸŽ€๐Ÿฆ‹๐Ÿ’–

๐Ÿ“ฆ where this page comes from