LAPACK  3.9.1
LAPACK: Linear Algebra PACKage

◆ dcombssq()

subroutine dcombssq ( double precision, dimension( 2 )  V1,
double precision, dimension( 2 )  V2 
)

DCOMBSSQ adds two scaled sum of squares quantities.

Purpose:
 DCOMBSSQ adds two scaled sum of squares quantities, V1 := V1 + V2.
 That is,

    V1_scale**2 * V1_sumsq := V1_scale**2 * V1_sumsq
                            + V2_scale**2 * V2_sumsq
Parameters
[in,out]V1
          V1 is DOUBLE PRECISION array, dimension (2).
          The first scaled sum.
          V1(1) = V1_scale, V1(2) = V1_sumsq.
[in]V2
          V2 is DOUBLE PRECISION array, dimension (2).
          The second scaled sum.
          V2(1) = V2_scale, V2(2) = V2_sumsq.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.

Definition at line 59 of file dcombssq.f.

60 *
61 * -- LAPACK auxiliary routine --
62 * -- LAPACK is a software package provided by Univ. of Tennessee, --
63 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
64 * November 2018
65 *
66 * .. Array Arguments ..
67  DOUBLE PRECISION V1( 2 ), V2( 2 )
68 * ..
69 *
70 * =====================================================================
71 *
72 * .. Parameters ..
73  DOUBLE PRECISION ZERO
74  parameter( zero = 0.0d+0 )
75 * ..
76 * .. Executable Statements ..
77 *
78  IF( v1( 1 ).GE.v2( 1 ) ) THEN
79  IF( v1( 1 ).NE.zero ) THEN
80  v1( 2 ) = v1( 2 ) + ( v2( 1 ) / v1( 1 ) )**2 * v2( 2 )
81  ELSE
82  v1( 2 ) = v1( 2 ) + v2( 2 )
83  END IF
84  ELSE
85  v1( 2 ) = v2( 2 ) + ( v1( 1 ) / v2( 1 ) )**2 * v1( 2 )
86  v1( 1 ) = v2( 1 )
87  END IF
88  RETURN
89 *
90 * End of DCOMBSSQ
91 *
Here is the caller graph for this function: