SRC/crot.f(3)

πŸ’… SRC/crot.f β€” like, the whole vibe

okay so bestie, this is a page from the LAPACK manual, specifically for the file SRC/crot.f. It's a Fortran thing. It's giving "library functions manual" realness. Let's get into it ✨


✨ SYNOPSIS ✨

πŸŽ€ Functions/Subroutines

subroutine crot (n, cx, incx, cy, incy, c, s)

CROT applies a plane rotation with real cosine and complex sine to a pair of complex vectors. That's the whole elevator pitch, and honestly? iconic. πŸŒ€


πŸ¦‹ Function/Subroutine Documentation πŸ¦‹

subroutine crot (integer n, complex, dimension( * ) cx, integer incx,
    complex, dimension( * ) cy, integer incy, real c, complex s)

CROT applies a plane rotation with real cosine and complex sine to a pair of complex vectors. Yes, again, because it's that important. 🫢

🌸 Purpose:

!>
!> CROT applies a plane rotation, where the cos (C) is real and the
!> sin (S) is complex, and the vectors CX and CY are complex.
!>

So like β€” the cosine is real, the sine is complex, and both vectors you're rotating are complex. Mixing real and complex like that? main character energy fr fr. πŸ’«

πŸ’– Parameters

  • N
!>          N is INTEGER
!>          The number of elements in the vectors CX and CY.
!>

N is an INTEGER, and it's literally just how many elements live in CX and CY. The headcount. The guest list. πŸ‘‘

  • CX
!>          CX is COMPLEX array, dimension (N)
!>          On input, the vector X.
!>          On output, CX is overwritten with C*X + S*Y.
!>

CX is a COMPLEX array with dimension (N). On input it's vector X, and on output it gets overwritten with C*X + S*Y. so it's not keeping its old self, it's serving a whole new look. glow-up via rotation πŸ’…

  • INCX
!>          INCX is INTEGER
!>          The increment between successive values of CX.  INCX <> 0.
!>

INCX is an INTEGER β€” the increment between successive values of CX. And no cap: INCX <> 0. Zero is not the vibe, don't do it. πŸ™ˆ

  • CY
!>          CY is COMPLEX array, dimension (N)
!>          On input, the vector Y.
!>          On output, CY is overwritten with -CONJG(S)*X + C*Y.
!>

CY is a COMPLEX array, dimension (N). On input, vector Y. On output, overwritten with -CONJG(S)*X + C*Y. note the conjugate and the minus sign β€” do not lose them, bestie, they're load-bearing 🧚

  • INCY
!>          INCY is INTEGER
!>          The increment between successive values of CY.  INCX <> 0.
!>

INCY is an INTEGER β€” the increment between successive values of CY. And yes, the original text really does say INCX <> 0 here on the INCY entry. That's what the page says, so that's what I'm telling you. πŸ’€ (just reporting the lore, not fixing it)

  • C
!>          C is REAL
!>

C is REAL. short and sweet. the real one in a complex situation 🌈

  • S
!>          S is COMPLEX
!>          C and S define a rotation
!>             [  C          S  ]
!>             [ -conjg(S)   C  ]
!>          where C*C + S*CONJG(S) = 1.0.
!>

S is COMPLEX, and together C and S define a rotation that looks exactly like this:

   [  C          S  ]
   [ -conjg(S)   C  ]

with the condition that C*C + S*CONJG(S) = 1.0. that's the normalization, bestie β€” it's what keeps the rotation honest. ✨


πŸ‘‘ Author

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

Definition at line 102 of file crot.f. go look, it's really there πŸŽ€


⭐ Author

Generated automatically by Doxygen for LAPACK from the source code. so nobody hand-wrote this bad boy, it's a machine's finest work πŸ€–βœ¨


okay so quick recap for the girlies in the back: CROT rotates a pair of complex vectors using a real cosine C and a complex sine S. CX becomes C*X + S*Y, CY becomes -CONJG(S)*X + C*Y, INCX and INCY can't be 0, and C*C + S*CONJG(S) = 1.0. that's it. that's the whole slay. πŸ’œ

LAPACK β€” Version 3.12.0, and this little page is SRC/crot.f(3). mwah, bye bestie πŸ«ΆπŸ’–πŸŽ€

πŸ“¦ where this page comes from