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

Function dlassq_

numpy/linalg/lapack_lite/f2c_d_lapack.c:31594–31686  ·  view source on GitHub ↗

Subroutine */

Source from the content-addressed store, hash-verified

31592} /* dlasrt_ */
31593
31594/* Subroutine */ int dlassq_(integer *n, doublereal *x, integer *incx,
31595 doublereal *scale, doublereal *sumsq)
31596{
31597 /* System generated locals */
31598 integer i__1, i__2;
31599 doublereal d__1;
31600
31601 /* Local variables */
31602 static integer ix;
31603 static doublereal absxi;
31604
31605
31606/*
31607 -- LAPACK auxiliary routine (version 3.2) --
31608 -- LAPACK is a software package provided by Univ. of Tennessee, --
31609 -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
31610 November 2006
31611
31612
31613 Purpose
31614 =======
31615
31616 DLASSQ returns the values scl and smsq such that
31617
31618 ( scl**2 )*smsq = x( 1 )**2 +...+ x( n )**2 + ( scale**2 )*sumsq,
31619
31620 where x( i ) = X( 1 + ( i - 1 )*INCX ). The value of sumsq is
31621 assumed to be non-negative and scl returns the value
31622
31623 scl = max( scale, abs( x( i ) ) ).
31624
31625 scale and sumsq must be supplied in SCALE and SUMSQ and
31626 scl and smsq are overwritten on SCALE and SUMSQ respectively.
31627
31628 The routine makes only one pass through the vector x.
31629
31630 Arguments
31631 =========
31632
31633 N (input) INTEGER
31634 The number of elements to be used from the vector X.
31635
31636 X (input) DOUBLE PRECISION array, dimension (N)
31637 The vector for which a scaled sum of squares is computed.
31638 x( i ) = X( 1 + ( i - 1 )*INCX ), 1 <= i <= n.
31639
31640 INCX (input) INTEGER
31641 The increment between successive values of the vector X.
31642 INCX > 0.
31643
31644 SCALE (input/output) DOUBLE PRECISION
31645 On entry, the value scale in the equation above.
31646 On exit, SCALE is overwritten with scl , the scaling factor
31647 for the sum of squares.
31648
31649 SUMSQ (input/output) DOUBLE PRECISION
31650 On entry, the value sumsq in the equation above.
31651 On exit, SUMSQ is overwritten with smsq , the basic sum of

Callers 3

dlange_Function · 0.85
dlanst_Function · 0.85
dlansy_Function · 0.85

Calls 1

absFunction · 0.85

Tested by

no test coverage detected