SRC/slartgp.f(3)

πŸ’… SRC/slartgp.f(3) β€” Library Functions Manual, bestie edition

okay so this is SRC/slartgp.f(3) from the local function manual and honestly? she's a little icon. let's get into it ✨


🌸 NAME

SRC/slartgp.f β€” like, the file itself, that's the name, no notes πŸ’…


πŸ¦‹ SYNOPSIS

Functions/Subroutines

  • subroutine slartgp (f, g, cs, sn, r) β€” SLARTGP generates a plane rotation so that the diagonal is nonnegative. that's the whole vibe πŸŽ€

πŸ‘‘ Function/Subroutine Documentation

subroutine slartgp (real f, real g, real cs, real sn, real r)

SLARTGP generates a plane rotation so that the diagonal is nonnegative. periodt πŸ’«

✨ Purpose:

!>
!> SLARTGP generates a plane rotation so that
!>
!>    [  CS  SN  ]  .  [ F ]  =  [ R ]   where CS**2 + SN**2 = 1.
!>    [ -SN  CS  ]     [ G ]     [ 0 ]
!>
!> This is a slower, more accurate version of the Level 1 BLAS routine SROTG,
!> with the following other differences:
!>    F and G are unchanged on return.
!>    If G=0, then CS=(+/-)1 and SN=0.
!>    If F=0 and (G .ne. 0), then CS=0 and SN=(+/-)1.
!>
!> The sign is chosen so that R >= 0.
!>

so basically πŸ’– she's giving slower but more accurate β€” yes she takes her time, she's thorough, she's that girl. and the differences from SROTG? iconic list, let me read them to you:

  • F and G are unchanged on return β€” they come back exactly as they left, no cap πŸ‘‘
  • if G=0, then CS=(+/-)1 and SN=0
  • if F=0 and (G .ne. 0), then CS=0 and SN=(+/-)1
  • the sign is chosen so that R >= 0 β€” nonnegative diagonal, that's the whole assignment 🎯

🌈 Parameters

  • F β€” is REAL. the first component of the vector to be rotated. she's component nΓΊmero uno πŸ“
  • G β€” is REAL. the second component of the vector to be rotated. component dos, standing right behind her πŸ’œ
  • CS β€” is REAL. the cosine of the rotation. cos of the situation 😌
  • SN β€” is REAL. the sine of the rotation. sin, obviously, matching set πŸŽ€
  • R β€” is REAL. the nonzero component of the rotated vector. the one who actually shows up πŸ‘‘
ok and here's a lil note straight from the source, don't skip it: This version has a few statements commented out for thread safety (machine parameters are computed on each entry). 10 feb 03, SJH. so yes she's thread-safe, and yes she recomputes the machine parameters on every single entry β€” that's the trade-off, that's the lore 🧚

⭐ Author

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

πŸ¦‹ Definition at line 94 of file slartgp.f.


πŸ’– Author

Generated automatically by Doxygen for LAPACK from the source code. (yes, a robot wrote this and she still ate 🌸)


okay that's the whole page bestie, no crumbs left 🫢 this was LAPACK Version 3.12.0, SRC/slartgp.f(3), and that's the cute lil sign-off β€” mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from