MCPcopy Create free account
hub / github.com/numpy/numpy / zlassq_

Function zlassq_

numpy/linalg/lapack_lite/f2c_z_lapack.c:21156–21267  ·  view source on GitHub ↗

Subroutine */

Source from the content-addressed store, hash-verified

21154} /* zlasr_ */
21155
21156/* Subroutine */ int zlassq_(integer *n, doublecomplex *x, integer *incx,
21157 doublereal *scale, doublereal *sumsq)
21158{
21159 /* System generated locals */
21160 integer i__1, i__2, i__3;
21161 doublereal d__1;
21162
21163 /* Local variables */
21164 static integer ix;
21165 static doublereal temp1;
21166
21167
21168/*
21169 -- LAPACK auxiliary routine (version 3.2) --
21170 -- LAPACK is a software package provided by Univ. of Tennessee, --
21171 -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
21172 November 2006
21173
21174
21175 Purpose
21176 =======
21177
21178 ZLASSQ returns the values scl and ssq such that
21179
21180 ( scl**2 )*ssq = x( 1 )**2 +...+ x( n )**2 + ( scale**2 )*sumsq,
21181
21182 where x( i ) = abs( X( 1 + ( i - 1 )*INCX ) ). The value of sumsq is
21183 assumed to be at least unity and the value of ssq will then satisfy
21184
21185 1.0 .le. ssq .le. ( sumsq + 2*n ).
21186
21187 scale is assumed to be non-negative and scl returns the value
21188
21189 scl = max( scale, abs( real( x( i ) ) ), abs( aimag( x( i ) ) ) ),
21190 i
21191
21192 scale and sumsq must be supplied in SCALE and SUMSQ respectively.
21193 SCALE and SUMSQ are overwritten by scl and ssq respectively.
21194
21195 The routine makes only one pass through the vector X.
21196
21197 Arguments
21198 =========
21199
21200 N (input) INTEGER
21201 The number of elements to be used from the vector X.
21202
21203 X (input) COMPLEX*16 array, dimension (N)
21204 The vector x as described above.
21205 x( i ) = X( 1 + ( i - 1 )*INCX ), 1 <= i <= n.
21206
21207 INCX (input) INTEGER
21208 The increment between successive values of the vector X.
21209 INCX > 0.
21210
21211 SCALE (input/output) DOUBLE PRECISION
21212 On entry, the value scale in the equation above.
21213 On exit, SCALE is overwritten with the value scl .

Callers 2

zlange_Function · 0.85
zlanhe_Function · 0.85

Calls 1

absFunction · 0.85

Tested by

no test coverage detected