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

Function classq_

numpy/linalg/lapack_lite/f2c_c_lapack.c:21049–21160  ·  view source on GitHub ↗

Subroutine */

Source from the content-addressed store, hash-verified

21047} /* clasr_ */
21048
21049/* Subroutine */ int classq_(integer *n, complex *x, integer *incx, real *
21050 scale, real *sumsq)
21051{
21052 /* System generated locals */
21053 integer i__1, i__2, i__3;
21054 real r__1;
21055
21056 /* Local variables */
21057 static integer ix;
21058 static real temp1;
21059
21060
21061/*
21062 -- LAPACK auxiliary routine (version 3.2) --
21063 -- LAPACK is a software package provided by Univ. of Tennessee, --
21064 -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
21065 November 2006
21066
21067
21068 Purpose
21069 =======
21070
21071 CLASSQ returns the values scl and ssq such that
21072
21073 ( scl**2 )*ssq = x( 1 )**2 +...+ x( n )**2 + ( scale**2 )*sumsq,
21074
21075 where x( i ) = abs( X( 1 + ( i - 1 )*INCX ) ). The value of sumsq is
21076 assumed to be at least unity and the value of ssq will then satisfy
21077
21078 1.0 .le. ssq .le. ( sumsq + 2*n ).
21079
21080 scale is assumed to be non-negative and scl returns the value
21081
21082 scl = max( scale, abs( real( x( i ) ) ), abs( aimag( x( i ) ) ) ),
21083 i
21084
21085 scale and sumsq must be supplied in SCALE and SUMSQ respectively.
21086 SCALE and SUMSQ are overwritten by scl and ssq respectively.
21087
21088 The routine makes only one pass through the vector X.
21089
21090 Arguments
21091 =========
21092
21093 N (input) INTEGER
21094 The number of elements to be used from the vector X.
21095
21096 X (input) COMPLEX array, dimension (N)
21097 The vector x as described above.
21098 x( i ) = X( 1 + ( i - 1 )*INCX ), 1 <= i <= n.
21099
21100 INCX (input) INTEGER
21101 The increment between successive values of the vector X.
21102 INCX > 0.
21103
21104 SCALE (input/output) REAL
21105 On entry, the value scale in the equation above.
21106 On exit, SCALE is overwritten with the value scl .

Callers 2

clange_Function · 0.85
clanhe_Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected