SROTG(3)
Hey bestie! Welcome to SROTG(3), a page from the Library Functions Manual β¨. Buckle up, because this is a whole LAPACK BLAS subroutine doc and we are keeping every crumb.
π NAME π
Okay so the NAME section is literally just this path, no cap:
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/BLAS/SRC/srotg.f90
Yep. That's the name vibe. π
β¨ SYNOPSIS β¨
π Functions/Subroutines π
Lowkey tiny synopsis, highkey important:
subroutine SROTG (a, b, c, s)
SROTG
π¦ Function/Subroutine Documentation π¦
π subroutine SROTG (real(wp) a, real(wp) b, real(wp) c, real(wp) s) π
SROTG β that's the line, bestie. Iconic.
π Purpose π
Here's the actual purpose block, verbatim because we do not mess with math:
!>
!> SROTG constructs a plane rotation
!> [ c s ] [ a ] = [ r ]
!> [ -s c ] [ b ] [ 0 ]
!> satisfying c**2 + s**2 = 1.
!>
!> The computation uses the formulas
!> sigma = sgn(a) if |a| > |b|
!> = sgn(b) if |b| >= |a|
!> r = sigma*sqrt( a**2 + b**2 )
!> c = 1; s = 0 if r = 0
!> c = a/r; s = b/r if r != 0
!> The subroutine also computes
!> z = s if |a| > |b|,
!> = 1/c if |b| >= |a| and c != 0
!> = 1 if c = 0
!> This allows c and s to be reconstructed from z as follows:
!> If z = 1, set c = 0, s = 1.
!> If |z| < 1, set c = sqrt(1 - z**2) and s = z.
!> If |z| > 1, set c = 1/z and s = sqrt( 1 - c**2).
!>
!>
π See also π
The see-also energy is real. Here's the block exactly, including the line break and the rot, bestie:
lartg: generate plane rotation, more accurate than BLAS
rot,
lartgp: generate plane rotation, more accurate than BLAS rot
πΈ Parameters πΈ
Four scalars, all REAL, all doing their thing:
AβA is REAL. On entry, the scalara. On exit, the scalarr.BβB is REAL. On entry, the scalarb. On exit, the scalarz.CβC is REAL. The scalarc.SβS is REAL. The scalars.
ποΈ Author ποΈ
Edward Anderson, Lockheed Martin. Periodt.
π«Ά Contributors π«Ά
Weslley Pereira, University of Colorado Denver, USA.
π₯ Further Details π₯
The citation block, preserving all the academic sparkle:
!>
!> Anderson E. (2017)
!> Algorithm 978: Safe Scaling in the Level 1 BLAS
!> ACM Trans Math Softw 44:1--28
!> https://doi.org/10.1145/3061665
!>
!>
Definition at line 91 of file srotg.f90.
ποΈ Author ποΈ
Yep, another Author section. It says: Generated automatically by Doxygen for LAPACK from the source code.
That's the whole page, bestie π β LAPACK Version 3.12.0, footer path /home/abui...C/srotg.f90(3), and that's the cute sign-off. Bye π«Ά
π¦ where this page comes from
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms