SRC/slasy2.f(3)
π SRC/slasy2.f(3) π
Okay so bestie, welcome to the Library Functions Manual β this whole page is about SRC/slasy2.f, and honestly? It's giving main character energy. Let's get into it. π«Ά
β¨ NAME β¨
SRC/slasy2.f β that's the file, and it's literally the blueprint for solving a Sylvester matrix equation when the matrices are tiny (order 1 or 2). No cap. π
πΈ SYNOPSIS πΈ
Functions/Subroutines
Here's the serve:
subroutine slasy2 (ltranl, ltranr, isgn, n1, n2, tl, ldtl, tr, ldtr, b,
ldb, scale, x, ldx, xnorm, info)
And what does it do? SLASY2 solves the Sylvester matrix equation where the matrices are of order 1 or 2. Periodt. π₯
π¦ Function/Subroutine Documentation π¦
Okay so here's the full signature β read it and weep (with joy):
subroutine slasy2 (logical ltranl, logical ltranr, integer isgn, integer n1,
integer n2, real, dimension( ldtl, * ) tl, integer ldtl, real,
dimension( ldtr, * ) tr, integer ldtr, real, dimension( ldb, * ) b,
integer ldb, real scale, real, dimension( ldx, * ) x, integer ldx, real
xnorm, integer info)
SLASY2 solves the Sylvester matrix equation where the matrices are of order 1 or 2. (Yes, I said it again. It's iconic. π )
Purpose:
Straight from the source, no edits:
!>
!> SLASY2 solves for the N1 by N2 matrix X, 1 <= N1,N2 <= 2, in
!>
!> op(TL)*X + ISGN*X*op(TR) = SCALE*B,
!>
!> where TL is N1 by N1, TR is N2 by N2, B is N1 by N2, and ISGN = 1 or
!> -1. op(T) = T or T**T, where T**T denotes the transpose of T.
!>
Like, it's literally solving a tiny little matrix equation. So cute. π§
Parameters
Every single one, bestie. No skipping. π
LTRANLβLTRANLisLOGICAL. On entry,LTRANLspecifies theop(TL):= .FALSE.,op(TL) = TL= .TRUE.,op(TL) = TL**T
LTRANRβLTRANRisLOGICAL. On entry,LTRANRspecifies theop(TR):= .FALSE.,op(TR) = TR= .TRUE.,op(TR) = TR**T
ISGNβISGNisINTEGER. On entry,ISGNspecifies the sign of the equation as described before.ISGNmay only be1or-1. π¦N1βN1isINTEGER. On entry,N1specifies the order of matrixTL.N1may only be0,1or2. (Tiny matrices only. We don't do big here. π)N2βN2isINTEGER. On entry,N2specifies the order of matrixTR.N2may only be0,1or2.TLβTLisREALarray, dimension(LDTL,2). On entry,TLcontains anN1byN1matrix.LDTLβLDTLisINTEGER. The leading dimension of the matrixTL.LDTL >= max(1,N1). β οΈTRβTRisREALarray, dimension(LDTR,2). On entry,TRcontains anN2byN2matrix.LDTRβLDTRisINTEGER. The leading dimension of the matrixTR.LDTR >= max(1,N2). β οΈBβBisREALarray, dimension(LDB,2). On entry, theN1byN2matrixBcontains the right-hand side of the equation. πLDBβLDBisINTEGER. The leading dimension of the matrixB.LDB >= max(1,N1). β οΈSCALEβSCALEisREAL. On exit,SCALEcontains the scale factor.SCALEis chosen less than or equal to1to prevent the solution overflowing. (Safety first, bestie. π)XβXisREALarray, dimension(LDX,2). On exit,Xcontains theN1byN2solution. That's the whole point! π―LDXβLDXisINTEGER. The leading dimension of the matrixX.LDX >= max(1,N1). β οΈXNORMβXNORMisREAL. On exit,XNORMis the infinity-norm of the solution. (Fancy math flex. π)INFOβINFOisINTEGER. On exit,INFOis set to:0: successful exit. π1:TLandTRhave too close eigenvalues, soTLorTRis perturbed to get a nonsingular equation. π¬
NOTE: In the interests of speed, this routine does not check the inputs for errors. π¨ Like, it's fast and loose. You've been warned.
Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 172 of file slasy2.f. π
π Author π
Generated automatically by Doxygen for LAPACK from the source code. (The robots did this one. π€)
And that's the whole vibe, bestie. This masterpiece is from LAPACK Version 3.12.0, file SRC/slasy2.f(3). Bye! πβ¨
π¦ 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