BLAS/SRC/drotg.f90(3)
β¨ BLAS/SRC/drotg.f90(3) β¨
Library Functions Manual? Bestie, we're deep in the manual-verse and the page name is BLAS/SRC/drotg.f90. It's giving BLAS rotation realness, and yes, DROTG is the main character. π
πΈ NAME πΈ
BLAS/SRC/drotg.f90 β that's the name, and that's the page. Periodt.
π¦ SYNOPSIS π¦
Functions/Subroutines
subroutine drotg (a, b, c, s)β DROTG
π Function/Subroutine Documentation π
subroutine drotg (real(wp) a, real(wp) b, real(wp) c, real(wp) s)
DROTG
β¨ Purpose β¨
Okay so DROTG constructs a plane rotation, and the whole point is this matrix situation right here:
!> DROTG 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).
!>
!>
Yes, that's the exact formula block, no cap. The z stash is lowkey giving "save it for later" energy so c and s can be reconstructed β iconic. π
π See also π
lartg: generate plane rotation, more accurate than BLASrot,lartgp: generate plane rotation, more accurate than BLASrot
π Parameters π
AβA is DOUBLE PRECISION. On entry, the scalara. On exit, the scalarr.BβB is DOUBLE PRECISION. On entry, the scalarb. On exit, the scalarz.CβC is DOUBLE PRECISION. The scalarc.SβS is DOUBLE PRECISION. The scalars.
π Author π
Edward Anderson, Lockheed Martin
π«Ά Contributors π«Ά
Weslley Pereira, University of Colorado Denver, USA
π₯ Further Details π₯
!>
!> 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 drotg.f90.
π Author π
Generated automatically by Doxygen for LAPACK from the source code.
β¨ Okay bestie, that's the whole page! Cute footer sign-off: LAPACK Version 3.12.0 Β· BLAS/SRC/drotg.f90(3) β no extra date in this footer, just the version-and-source energy. π
π¦ 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