SRC/dlassq.f90(3)
okay bestie, welcome to SRC/dlassq.f90(3) from the Library Functions Manual β sheβs a Fortran subroutine and honestly? iconic. π
πΈ NAME πΈ
SRC/dlassq.f90 β thatβs the name, periodt. π
β¨ SYNOPSIS β¨
π§ Functions/Subroutines π§
Hereβs the call shape, no cap:
subroutine dlassq (n, x, incx, scale, sumsq)
DLASSQ updates a sum of squares represented in scaled form.
π Function/Subroutine Documentation π
π¦ subroutine dlassq π¦
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.
π Purpose π
okay so 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.
π Parameters π
NβN is INTEGER; the number of elements to be used from the vectorx.Xβ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 increment between successive values of the vectorx.- If
INCX > 0,X(1+(i-1)*INCX) = x(i)for1 <= i <= n - If
INCX < 0,X(1-(n-i)*INCX) = x(i)for1 <= i <= n - If
INCX = 0,xisnβt a vector so there is no need to call this subroutine. If you call it anyway, it will countx(1)in the vector normNtimes. π
- If
SCALEβSCALE is DOUBLE PRECISION- On entry, the value
scalein the equation above. - On exit,
SCALEis overwritten byscale_out, the scaling factor for the sum of squares.
- On entry, the value
SUMSQβSUMSQ is DOUBLE PRECISION- On entry, the value
sumsqin the equation above. - On exit,
SUMSQis overwritten bysumsq_out, the basic sum of squares from whichscale_outhas been factored out.
- On entry, the value
π Author π
Edward Anderson, Lockheed Martin
π Contributors: π
Weslley Pereira, University of Colorado Denver, USA Nick Papior, Technical University of Denmark, DK
β Further Details: β
- 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.
mwah π β this cutie came from LAPACK Version 3.12.0, page SRC/dlassq.f90(3), and thatβs the footer energy, 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