zlassq.f(3)

πŸ“¦ version 3.9.0, in centos-stream 9

πŸ’– NAME πŸ’–

okay so bestie, welcome to zlassq.f β€” that's the file you're looking at right now, and also literally the whole name section, that's it, that's the name πŸŽ€


✨ SYNOPSIS ✨

πŸ¦‹ Functions/Subroutines πŸ¦‹

  • subroutine zlassq (N, X, INCX, SCALE, SUMSQ) β€” ZLASSQ updates a sum of squares represented in scaled form. that's the whole vibe, no cap πŸ’…

🧚 Function/Subroutine Documentation 🧚

subroutine zlassq (integer N, complex*16, dimension( * ) X, integer INCX,
    double precision SCALE, double precision SUMSQ)

ZLASSQ updates a sum of squares represented in scaled form. like, it's the scaled-form glow-up of a sum of squares, and honestly it ate πŸ”₯

🌸 Purpose 🌸

okay so ZLASSQ hands you back the values scl and ssq such that:

   ( scl**2 )*ssq = x( 1 )**2 +...+ x( n )**2 + ( scale**2 )*sumsq,

where x( i ) = abs( X( 1 + ( i - 1 )*INCX ) ). so every element gets abs'd first, then squared β€” that's the whole recipe πŸ“

the value of sumsq is assumed to be at least unity (so, β‰₯ 1, don't come in below that), and the value of ssq will then satisfy:

   1.0 .le. ssq .le. ( sumsq + 2*n ).

scale is assumed to be non-negative, and scl returns the value:

   scl = max( scale, abs( real( x( i ) ) ), abs( aimag( x( i ) ) ) ),
          i

so it's the max over all i, lowkey taking the biggest of: scale itself, the absolute real part of each x( i ), and the absolute imaginary part of each x( i ). that's the ceiling, that's the moment πŸ‘‘

scale and sumsq must be supplied in SCALE and SUMSQ respectively β€” you have to hand them in, like giving your friend your order before they go to the counter. then SCALE and SUMSQ are overwritten by scl and ssq respectively. so heads up: they don't survive, they get replaced fr fr πŸ™ˆ

and the iconic part: the routine makes only one pass through the vector X. one. pass. no re-reading, no going back, efficient queen behavior ✨

πŸŽ€ Parameters πŸŽ€

N

N is INTEGER β€” the number of elements to be used from the vector X. like how many of them you're actually inviting to the function πŸ’–

X

X is COMPLEX*16 array, dimension (N) β€” the vector x as described above, meaning:

   x( i )  = X( 1 + ( i - 1 )*INCX ), 1 <= i <= n.

so it's strided, okurrr πŸ’…

INCX

INCX is INTEGER β€” the increment between successive values of the vector X. and INCX > 0, so it's strictly positive, no zero, no negative, none of that chaos 🫢

SCALE

SCALE is DOUBLE PRECISION β€” on entry, the value scale in the equation above. on exit, SCALE is overwritten with the value scl. she goes in as one thing and comes out as another, main character transformation arc πŸ¦‹

SUMSQ

SUMSQ is DOUBLE PRECISION β€” on entry, the value sumsq in the equation above. on exit, SUMSQ is overwritten with the value ssq. same deal, same glow-up 🌈

πŸ‘‘ Author πŸ‘‘

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

the whole squad really came together for this one, we love a collab πŸ˜­πŸ’œ

⭐ Date ⭐

December 2016 β€” vintage, but still iconic πŸŽ€


Definition at line 108 of file zlassq.f. (go look, it's literally right there πŸ‘€)


🌟 Author 🌟

Generated automatically by Doxygen for LAPACK from the source code. so no human wrote that part, it's giving robot intern energy πŸ’€ but make no mistake, it's doing its job


okay bestie that's the whole page! and for the cute sign-off: this was Version 3.8.0, dated Tue Nov 14 2017, and you just read zlassq.f(3) πŸ’–βœ¨ you understood it, you slayed it, periodt πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from