.TH "lassq" 3 "Wed Feb 7 2024 11:30:40" "Version 3.12.0" "LAPACK" \" -*- nroff -*- .ad l .nh .SH NAME lassq \- lassq: sum-of-squares, avoiding over/underflow .SH SYNOPSIS .br .PP .SS "Functions" .in +1c .ti -1c .RI "subroutine \fBclassq\fP (n, x, incx, scale, sumsq)" .br .RI "\fBCLASSQ\fP updates a sum of squares represented in scaled form\&. " .ti -1c .RI "subroutine \fBdlassq\fP (n, x, incx, scale, sumsq)" .br .RI "\fBDLASSQ\fP updates a sum of squares represented in scaled form\&. " .ti -1c .RI "subroutine \fBslassq\fP (n, x, incx, scale, sumsq)" .br .RI "\fBSLASSQ\fP updates a sum of squares represented in scaled form\&. " .ti -1c .RI "subroutine \fBzlassq\fP (n, x, incx, scale, sumsq)" .br .RI "\fBZLASSQ\fP updates a sum of squares represented in scaled form\&. " .in -1c .SH "Detailed Description" .PP .SH "Function Documentation" .PP .SS "subroutine classq (integer n, complex(wp), dimension(*) x, integer incx, real(wp) scale, real(wp) sumsq)" .PP \fBCLASSQ\fP updates a sum of squares represented in scaled form\&. .PP \fBPurpose:\fP .RS 4 .PP .nf CLASSQ 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\&. .fi .PP .RE .PP \fBParameters\fP .RS 4 \fIN\fP .PP .nf N is INTEGER The number of elements to be used from the vector x\&. .fi .PP .br \fIX\fP .PP .nf X is COMPLEX 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\&. .fi .PP .br \fIINCX\fP .PP .nf 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\&. .fi .PP .br \fISCALE\fP .PP .nf SCALE is REAL 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\&. .fi .PP .br \fISUMSQ\fP .PP .nf SUMSQ is REAL 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\&. .fi .PP .RE .PP \fBAuthor\fP .RS 4 Edward Anderson, Lockheed Martin .RE .PP \fBContributors:\fP .RS 4 Weslley Pereira, University of Colorado Denver, USA Nick Papior, Technical University of Denmark, DK .RE .PP \fBFurther Details:\fP .RS 4 .PP .nf 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 .fi .PP .RE .PP .SS "subroutine dlassq (integer n, real(wp), dimension(*) x, integer incx, real(wp) scale, real(wp) sumsq)" .PP \fBDLASSQ\fP updates a sum of squares represented in scaled form\&. .PP \fBPurpose:\fP .RS 4 .PP .nf 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\&. .fi .PP .RE .PP \fBParameters\fP .RS 4 \fIN\fP .PP .nf N is INTEGER The number of elements to be used from the vector x\&. .fi .PP .br \fIX\fP .PP .nf 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\&. .fi .PP .br \fIINCX\fP .PP .nf 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\&. .fi .PP .br \fISCALE\fP .PP .nf 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\&. .fi .PP .br \fISUMSQ\fP .PP .nf 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\&. .fi .PP .RE .PP \fBAuthor\fP .RS 4 Edward Anderson, Lockheed Martin .RE .PP \fBContributors:\fP .RS 4 Weslley Pereira, University of Colorado Denver, USA Nick Papior, Technical University of Denmark, DK .RE .PP \fBFurther Details:\fP .RS 4 .PP .nf 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 .fi .PP .RE .PP .SS "subroutine slassq (integer n, real(wp), dimension(*) x, integer incx, real(wp) scale, real(wp) sumsq)" .PP \fBSLASSQ\fP updates a sum of squares represented in scaled form\&. .PP \fBPurpose:\fP .RS 4 .PP .nf SLASSQ 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\&. .fi .PP .RE .PP \fBParameters\fP .RS 4 \fIN\fP .PP .nf N is INTEGER The number of elements to be used from the vector x\&. .fi .PP .br \fIX\fP .PP .nf X is REAL 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\&. .fi .PP .br \fIINCX\fP .PP .nf 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\&. .fi .PP .br \fISCALE\fP .PP .nf SCALE is REAL 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\&. .fi .PP .br \fISUMSQ\fP .PP .nf SUMSQ is REAL 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\&. .fi .PP .RE .PP \fBAuthor\fP .RS 4 Edward Anderson, Lockheed Martin .RE .PP \fBContributors:\fP .RS 4 Weslley Pereira, University of Colorado Denver, USA Nick Papior, Technical University of Denmark, DK .RE .PP \fBFurther Details:\fP .RS 4 .PP .nf 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 .fi .PP .RE .PP .SS "subroutine zlassq (integer n, complex(wp), dimension(*) x, integer incx, real(wp) scale, real(wp) sumsq)" .PP \fBZLASSQ\fP updates a sum of squares represented in scaled form\&. .PP \fBPurpose:\fP .RS 4 .PP .nf ZLASSQ 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\&. .fi .PP .RE .PP \fBParameters\fP .RS 4 \fIN\fP .PP .nf N is INTEGER The number of elements to be used from the vector x\&. .fi .PP .br \fIX\fP .PP .nf X is DOUBLE COMPLEX 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\&. .fi .PP .br \fIINCX\fP .PP .nf 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\&. .fi .PP .br \fISCALE\fP .PP .nf 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\&. .fi .PP .br \fISUMSQ\fP .PP .nf 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\&. .fi .PP .RE .PP \fBAuthor\fP .RS 4 Edward Anderson, Lockheed Martin .RE .PP \fBContributors:\fP .RS 4 Weslley Pereira, University of Colorado Denver, USA Nick Papior, Technical University of Denmark, DK .RE .PP \fBFurther Details:\fP .RS 4 .PP .nf 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 .fi .PP .RE .PP .SH "Author" .PP Generated automatically by Doxygen for LAPACK from the source code\&.