lasy2(3)

πŸ’… lasy2(3) β€” Sylvester equation, but make it ✨main character✨

okay so bestie, welcome to lasy2, the manual page for lasy2, which is the whole cute little family of routines that solves the Sylvester equation. it's giving "small matrices, big attitude" because literally everything here is order 1 or 2 β€” yes, ONE or TWO, that's the whole vibe. πŸŽ€


🌸 NAME 🌸

lasy2 β€” lasy2: Sylvester equation. no cap, that's the name, that's the job. πŸ¦‹


✨ SYNOPSIS ✨

πŸ’… Functions πŸ’…

  • subroutine dlasy2 (ltranl, ltranr, isgn, n1, n2, tl, ldtl, tr, ldtr, b, ldb, scale, x, ldx, xnorm, info) β€” DLASY2 solves the Sylvester matrix equation where the matrices are of order 1 or 2. πŸ’–
  • subroutine slasy2 (ltranl, ltranr, isgn, n1, n2, tl, ldtl, tr, ldtr, b, ldb, scale, x, ldx, xnorm, info) β€” SLASY2 solves the Sylvester matrix equation where the matrices are of order 1 or 2. πŸ’–

ngl, they're the same routine wearing different outfits β€” one's DOUBLE PRECISION coded, one's REAL coded. both iconic. πŸ‘‘


🌈 DESCRIPTION 🌈

Detailed Description

Not much to say here bestie, it's a Doxygen-generated page so the "description" section is literally just vibing before the function docs start. lowkey a place holder, but we respect it. πŸ™ˆ

Function Documentation


πŸ“ subroutine dlasy2 πŸ“

subroutine dlasy2 (logical ltranl, logical ltranr, integer isgn, integer n1,
    integer n2, double precision, dimension( ldtl, * ) tl, integer ldtl,
    double precision, dimension( ldtr, * ) tr, integer ldtr, double
    precision, dimension( ldb, * ) b, integer ldb, double precision scale,
    double precision, dimension( ldx, * ) x, integer ldx, double precision
    xnorm, integer info)

DLASY2 solves the Sylvester matrix equation where the matrices are of order 1 or 2. that's it, that's the whole flex. πŸ’ͺ

🫢 Purpose 🫢

!>
!> DLASY2 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.
!>

so like, DLASY2 solves for that N1 by N2 matrix X, with 1 <= N1,N2 <= 2, in the equation above ☝️ where TL is N1 by N1, TR is N2 by N2, B is N1 by N2, and ISGN = 1 or -1. and op(T) = T or T**T, where T**T means the transpose of T. math but make it cute. ✨

πŸ’œ Parameters πŸ’œ

  • LTRANL β€” LTRANL is LOGICAL. On entry, LTRANL specifies the op(TL):
    • = .FALSE., op(TL) = TL,
    • = .TRUE., op(TL) = TL**T.
  • LTRANR β€” LTRANR is LOGICAL. On entry, LTRANR specifies the op(TR):
    • = .FALSE., op(TR) = TR,
    • = .TRUE., op(TR) = TR**T.
  • ISGN β€” ISGN is INTEGER. On entry, ISGN specifies the sign of the equation as described before. ISGN may only be 1 or -1. that's the whole range, bestie, don't try to be creative. πŸ™ˆ
  • N1 β€” N1 is INTEGER. On entry, N1 specifies the order of matrix TL. N1 may only be 0, 1 or 2. tiny numbers only, we stay small over here. 🧚
  • N2 β€” N2 is INTEGER. On entry, N2 specifies the order of matrix TR. N2 may only be 0, 1 or 2. same energy. 🧚
  • TL β€” TL is DOUBLE PRECISION array, dimension (LDTL,2). On entry, TL contains an N1 by N1 matrix.
  • LDTL β€” LDTL is INTEGER. The leading dimension of the matrix TL. LDTL >= max(1,N1).
  • TR β€” TR is DOUBLE PRECISION array, dimension (LDTR,2). On entry, TR contains an N2 by N2 matrix.
  • LDTR β€” LDTR is INTEGER. The leading dimension of the matrix TR. LDTR >= max(1,N2).
  • B β€” B is DOUBLE PRECISION array, dimension (LDB,2). On entry, the N1 by N2 matrix B contains the right-hand side of the equation. it's literally the RHS, she's the support system. 🫢
  • LDB β€” LDB is INTEGER. The leading dimension of the matrix B. LDB >= max(1,N1).
  • SCALE β€” SCALE is DOUBLE PRECISION. On exit, SCALE contains the scale factor. SCALE is chosen less than or equal to 1 to prevent the solution overflowing. she's here to keep things from spilling over, a true queen of damage control. πŸ‘‘
  • X β€” X is DOUBLE PRECISION array, dimension (LDX,2). On exit, X contains the N1 by N2 solution. the moment we've all been waiting for. πŸ’…
  • LDX β€” LDX is INTEGER. The leading dimension of the matrix X. LDX >= max(1,N1).
  • XNORM β€” XNORM is DOUBLE PRECISION. On exit, XNORM is the infinity-norm of the solution. infinity-norm sounds dramatic and honestly? it is. ⭐
  • INFO β€” INFO is INTEGER. On exit, INFO is set to:
    • 0: successful exit. slay. πŸŽ‰
    • 1: TL and TR have too close eigenvalues, so TL or TR is perturbed to get a nonsingular equation. yeah she got nudged. it's fine. it's fine!! 😭
NOTE: In the interests of speed, this routine does not check the inputs for errors. bestie this is the loud part β€” it means if you feed her garbage, she will simply accept the garbage. no vibe check, no validation, just speed. handle your own error checking fr fr. πŸ’€

🌸 Author 🌸

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

Definition at line 172 of file dlasy2.f.


πŸ“ subroutine slasy2 πŸ“

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. same routine, REAL era. πŸ¦‹

🫢 Purpose 🫢

!>
!> 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.
!>

identical equation, identical energy, just REAL instead of DOUBLE PRECISION. the way that math doesn't change when you change precision... we love consistency. πŸ’–

πŸ’œ Parameters πŸ’œ

  • LTRANL β€” LTRANL is LOGICAL. On entry, LTRANL specifies the op(TL):
    • = .FALSE., op(TL) = TL,
    • = .TRUE., op(TL) = TL**T.
  • LTRANR β€” LTRANR is LOGICAL. On entry, LTRANR specifies the op(TR):
    • = .FALSE., op(TR) = TR,
    • = .TRUE., op(TR) = TR**T.
  • ISGN β€” ISGN is INTEGER. On entry, ISGN specifies the sign of the equation as described before. ISGN may only be 1 or -1. again. only those two. stay in your lane babe. πŸ™ˆ
  • N1 β€” N1 is INTEGER. On entry, N1 specifies the order of matrix TL. N1 may only be 0, 1 or 2. 🧚
  • N2 β€” N2 is INTEGER. On entry, N2 specifies the order of matrix TR. N2 may only be 0, 1 or 2. 🧚
  • TL β€” TL is REAL array, dimension (LDTL,2). On entry, TL contains an N1 by N1 matrix.
  • LDTL β€” LDTL is INTEGER. The leading dimension of the matrix TL. LDTL >= max(1,N1).
  • TR β€” TR is REAL array, dimension (LDTR,2). On entry, TR contains an N2 by N2 matrix.
  • LDTR β€” LDTR is INTEGER. The leading dimension of the matrix TR. LDTR >= max(1,N2).
  • B β€” B is REAL array, dimension (LDB,2). On entry, the N1 by N2 matrix B contains the right-hand side of the equation. 🫢
  • LDB β€” LDB is INTEGER. The leading dimension of the matrix B. LDB >= max(1,N1).
  • SCALE β€” SCALE is REAL. On exit, SCALE contains the scale factor. SCALE is chosen less than or equal to 1 to prevent the solution overflowing. still the anti-overflow queen. πŸ‘‘
  • X β€” X is REAL array, dimension (LDX,2). On exit, X contains the N1 by N2 solution. ✨
  • LDX β€” LDX is INTEGER. The leading dimension of the matrix X. LDX >= max(1,N1).
  • XNORM β€” XNORM is REAL. On exit, XNORM is the infinity-norm of the solution. ⭐
  • INFO β€” INFO is INTEGER. On exit, INFO is set to:
    • 0: successful exit. πŸŽ‰
    • 1: TL and TR have too close eigenvalues, so TL or TR is perturbed to get a nonsingular equation. 😭
NOTE: In the interests of speed, this routine does not check the inputs for errors. same warning, same meaning β€” she's fast and she trusts you. do not betray that trust. πŸ’€

🌸 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. yes bestie, a robot wrote this page, and honestly it ate. πŸ€–πŸ’…


okay that's the whole page!! before you go β€” this page is from LAPACK, Version 3.12.0, and the lasy2(3) page itself is dated the same as that release. go forth and solve your 1Γ—1 and 2Γ—2 Sylvester equations, you absolute legend. πŸŽ€πŸ’–βœ¨πŸ¦‹πŸŒΈπŸ«Ά

πŸ“¦ where this page comes from