DLASSQ(3)

πŸ“¦ version 3.12.0, in opensuse-leap 16.0

πŸ’… DLASSQ(3) β€” like, the scaled-sum-of-squares glow-up ✨

okay bestie, so this is a page out of the Library Functions Manual for dlassq.f90(3) β€” yes the whole NAME is literally just the path /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/dlassq.f90 😭 that's the actual name, we don't make the rules, we just slay within them.


✨ SYNOPSIS ✨

Functions/Subroutines β€” the whole vibe in one line:

subroutine DLASSQ (n, x, incx, scale, sumsq)
DLASSQ updates a sum of squares represented in scaled form. 🫢

πŸŽ€ Function/Subroutine Documentation πŸŽ€

Here's the full signature, character for character, no edits, periodt:

subroutine DLASSQ (integer n, real(wp), dimension(*) x, integer incx,
    real(wp) scale, real(wp) sumsq)

DLASSQ updates a sum of squares represented in scaled form. (yes it says it twice, it's confident, let it live πŸ’…)

🌸 Purpose 🌸

okay so here's what it actually does, and it's giving main character energy:

!>
!> DLASSQ returns the values scale_out and sumsq_out such that
!>
!>    (scale_out**2)*sumsq_out = x( 1 )**2 +...+ x( n )**2 + (scale**2)*sumsq,
!>
!> where x( i ) = X( 1 + ( i - 1 )*INCX ). The value of sumsq is
!> assumed to be non-negative.
!>
!> scale and sumsq must be supplied in SCALE and SUMSQ and
!> scale_out and sumsq_out are overwritten on SCALE and SUMSQ respectively.
!>
!>

like, it does NOT allocate anything for you, it just overwrites SCALE and SUMSQ in place β€” so don't come crying when your inputs are gone, that's the whole bit πŸ’€

πŸ’– Parameters πŸ’–

  • N β€” N is INTEGER, the number of elements to be used from the vector x.
!>          N is INTEGER
!>          The number of elements to be used from the vector x.
!>
  • X β€” X is DOUBLE PRECISION array, dimension (1+(N-1)*abs(INCX)). This is the vector whose scaled sum of squares gets computed πŸ¦‹
!>          X is DOUBLE PRECISION array, dimension (1+(N-1)*abs(INCX))
!>          The vector for which a scaled sum of squares is computed.
!>             x( i ) = X( 1 + ( i - 1 )*INCX ), 1 <= i <= n.
!>
  • INCX β€” INCX is INTEGER, the step between successive values of the vector x. Read this carefully bestie, all three cases matter πŸ‘‘
!>          INCX is INTEGER
!>          The increment between successive values of the vector x.
!>          If INCX > 0, X(1+(i-1)*INCX) = x(i) for 1 <= i <= n
!>          If INCX < 0, X(1-(n-i)*INCX) = x(i) for 1 <= i <= n
!>          If INCX = 0, x isn't a vector so there is no need to call
!>          this subroutine. If you call it anyway, it will count x(1)
!>          in the vector norm N times.
!>
ngl INCX = 0 is a trap πŸ™ˆ if you pass it, x(1) gets counted in the vector norm N whole times. The docs literally say "there is no need to call this subroutine" β€” that's them being polite, lowkey.
  • SCALE β€” SCALE is DOUBLE PRECISION. On entry it's the scale from the equation above; on exit it's been overwritten by scale_out, the scaling factor for the sum of squares ✨
!>          SCALE is DOUBLE PRECISION
!>          On entry, the value scale in the equation above.
!>          On exit, SCALE is overwritten by scale_out, the scaling factor
!>          for the sum of squares.
!>
  • SUMSQ β€” SUMSQ is DOUBLE PRECISION. On entry, the sumsq from the equation above; on exit, overwritten by sumsq_out, the basic sum of squares that scale_out has been factored out of 🧚
!>          SUMSQ is DOUBLE PRECISION
!>          On entry, the value sumsq in the equation above.
!>          On exit, SUMSQ is overwritten by sumsq_out, the basic sum of
!>          squares from which scale_out has been factored out.
!>

⭐ Author ⭐

Edward Anderson, Lockheed Martin πŸ‘‘

🌈 Contributors 🌈

Weslley Pereira, University of Colorado Denver, USA Nick Papior, Technical University of Denmark, DK

(we stan a credited collab, fr fr 🫢)

πŸ”₯ Further Details πŸ”₯

the receipts, in full, because citations are iconic:

!>
!>  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
!>
!>  Blue, James L. (1978)
!>  A Portable Fortran Program to Find the Euclidean Norm of a Vector
!>  ACM Trans Math Softw 4:15--23
!>  https://doi.org/10.1145/355769.355771
!>
!>

Definition at line 123 of file dlassq.f90. πŸ“


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for LAPACK from the source code. (not a human, just a robot doing its little robot thing πŸ€–βœ¨)


aaand that's the page, bestie πŸ’œ β€” brought to you by LAPACK, Version 3.12.0, dated /home/abui.../dlassq.f90(3) β€” mwah, go scale something responsibly πŸŽ€πŸ’–

πŸ“¦ where this page comes from