1
*> \brief \b ZLASSQ updates a sum of squares represented in scaled form.
3
* =========== DOCUMENTATION ===========
5
* Online html documentation available at
6
* http://www.netlib.org/lapack/explore-html/
9
*> Download ZLASSQ + dependencies
10
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlassq.f">
12
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlassq.f">
14
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlassq.f">
21
* SUBROUTINE ZLASSQ( N, X, INCX, SCALE, SUMSQ )
23
* .. Scalar Arguments ..
25
* DOUBLE PRECISION SCALE, SUMSQ
27
* .. Array Arguments ..
37
*> ZLASSQ returns the values scl and ssq such that
39
*> ( scl**2 )*ssq = x( 1 )**2 +...+ x( n )**2 + ( scale**2 )*sumsq,
41
*> where x( i ) = abs( X( 1 + ( i - 1 )*INCX ) ). The value of sumsq is
42
*> assumed to be at least unity and the value of ssq will then satisfy
44
*> 1.0 .le. ssq .le. ( sumsq + 2*n ).
46
*> scale is assumed to be non-negative and scl returns the value
48
*> scl = max( scale, abs( real( x( i ) ) ), abs( aimag( x( i ) ) ) ),
51
*> scale and sumsq must be supplied in SCALE and SUMSQ respectively.
52
*> SCALE and SUMSQ are overwritten by scl and ssq respectively.
54
*> The routine makes only one pass through the vector X.
63
*> The number of elements to be used from the vector X.
68
*> X is COMPLEX*16 array, dimension (N)
69
*> The vector x as described above.
70
*> x( i ) = X( 1 + ( i - 1 )*INCX ), 1 <= i <= n.
76
*> The increment between successive values of the vector X.
80
*> \param[in,out] SCALE
82
*> SCALE is DOUBLE PRECISION
83
*> On entry, the value scale in the equation above.
84
*> On exit, SCALE is overwritten with the value scl .
87
*> \param[in,out] SUMSQ
89
*> SUMSQ is DOUBLE PRECISION
90
*> On entry, the value sumsq in the equation above.
91
*> On exit, SUMSQ is overwritten with the value ssq .
97
*> \author Univ. of Tennessee
98
*> \author Univ. of California Berkeley
99
*> \author Univ. of Colorado Denver
102
*> \date September 2012
104
*> \ingroup complex16OTHERauxiliary
106
* =====================================================================
1
107
SUBROUTINE ZLASSQ( N, X, INCX, SCALE, SUMSQ )
3
* -- LAPACK auxiliary routine (version 2.0) --
4
* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
5
* Courant Institute, Argonne National Lab, and Rice University
109
* -- LAPACK auxiliary routine (version 3.4.2) --
110
* -- LAPACK is a software package provided by Univ. of Tennessee, --
111
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
8
114
* .. Scalar Arguments ..
17
* $Id: zlassq.f 19697 2010-10-29 16:57:34Z d3y133 $
22
* ZLASSQ returns the values scl and ssq such that
24
* ( scl**2 )*ssq = x( 1 )**2 +...+ x( n )**2 + ( scale**2 )*sumsq,
26
* where x( i ) = abs( X( 1 + ( i - 1 )*INCX ) ). The value of sumsq is
27
* assumed to be at least unity and the value of ssq will then satisfy
29
* 1.0 .le. ssq .le. ( sumsq + 2*n ).
31
* scale is assumed to be non-negative and scl returns the value
33
* scl = max( scale, abs( real( x( i ) ) ), abs( aimag( x( i ) ) ) ),
36
* scale and sumsq must be supplied in SCALE and SUMSQ respectively.
37
* SCALE and SUMSQ are overwritten by scl and ssq respectively.
39
* The routine makes only one pass through the vector X.
45
* The number of elements to be used from the vector X.
47
* X (input) DOUBLE PRECISION
48
* The vector x as described above.
49
* x( i ) = X( 1 + ( i - 1 )*INCX ), 1 <= i <= n.
51
* INCX (input) INTEGER
52
* The increment between successive values of the vector X.
55
* SCALE (input/output) DOUBLE PRECISION
56
* On entry, the value scale in the equation above.
57
* On exit, SCALE is overwritten with the value scl .
59
* SUMSQ (input/output) DOUBLE PRECISION
60
* On entry, the value sumsq in the equation above.
61
* On exit, SUMSQ is overwritten with the value ssq .
63
122
* =====================================================================
65
124
* .. Parameters ..