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:CROTrotates a pair of complex vectors using a real cosineCand a complex sineS.CXbecomesC*X + S*Y,CYbecomes-CONJG(S)*X + C*Y,INCXandINCYcan't be0, andC*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
- 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