1DLASSQ(1) LAPACK auxiliary routine (version 3.2) DLASSQ(1)
2
3
4
6 DLASSQ - returns the values scl and smsq such that ( scl**2 )*smsq =
7 x( 1 )**2 +...+ x( n )**2 + ( scale**2 )*sumsq,
8
10 SUBROUTINE DLASSQ( N, X, INCX, SCALE, SUMSQ )
11
12 INTEGER INCX, N
13
14 DOUBLE PRECISION SCALE, SUMSQ
15
16 DOUBLE PRECISION X( * )
17
19 DLASSQ returns the values scl and smsq such that where x( i ) =
20 X( 1 + ( i - 1 )*INCX ). The value of sumsq is assumed to be non-neg‐
21 ative and scl returns the value
22 scl = max( scale, abs( x( i ) ) ).
23 scale and sumsq must be supplied in SCALE and SUMSQ and
24 scl and smsq are overwritten on SCALE and SUMSQ respectively. The rou‐
25 tine makes only one pass through the vector x.
26
28 N (input) INTEGER
29 The number of elements to be used from the vector X.
30
31 X (input) DOUBLE PRECISION array, dimension (N)
32 The vector for which a scaled sum of squares is computed. x( i
33 ) = X( 1 + ( i - 1 )*INCX ), 1 <= i <= n.
34
35 INCX (input) INTEGER
36 The increment between successive values of the vector X. INCX
37 > 0.
38
39 SCALE (input/output) DOUBLE PRECISION
40 On entry, the value scale in the equation above. On exit,
41 SCALE is overwritten with scl , the scaling factor for the sum
42 of squares.
43
44 SUMSQ (input/output) DOUBLE PRECISION
45 On entry, the value sumsq in the equation above. On exit,
46 SUMSQ is overwritten with smsq , the basic sum of squares from
47 which scl has been factored out.
48
49
50
51 LAPACK auxiliary routine (versionNo3v.e2m)ber 2008 DLASSQ(1)